diff --git a/lib/node_modules/@stdlib/math/base/special/sincospi/README.md b/lib/node_modules/@stdlib/math/base/special/sincospi/README.md index 0c199256843a..80887205249a 100644 --- a/lib/node_modules/@stdlib/math/base/special/sincospi/README.md +++ b/lib/node_modules/@stdlib/math/base/special/sincospi/README.md @@ -90,6 +90,96 @@ for ( i = 0; i < x.length; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/math/base/special/sincospi.h" +``` + +#### stdlib_base_sincospi( x, &sine, &cosine ) + +Simultaneously computes the [sine][@stdlib/math/base/special/sin] and [cosine][@stdlib/math/base/special/cos] of a `number` times [π][@stdlib/constants/float64/pi] more accurately than `sincos(pi*x)`, especially for large `x`. + +```c +double cosine; +double sine; + +stdlib_base_sincospi( 4.0, &sine, &cosine ); +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **sine**: `[out] double*` destination for the sine. +- **cosine**: `[out] double*` destination for the cosine. + +```c +void stdlib_base_sincospi( const double x, double *sine, double *cosine ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/math/base/special/sincospi.h" +#include + +int main( void ) { + const double x[] = { 0.0, 1.57, 3.14, 6.28 }; + + double cosine; + double sine; + int i; + for ( i = 0; i < 4; i++ ) { + stdlib_base_sincospi( x[ i ], &sine, &cosine ); + printf( "x: %lf => sine: %lf, cosine: %lf\n", x[ i ], sine, cosine ); + } +} +``` + +
+ + + +
+ + +