Go to the first, previous, next, last section, table of contents.
#include <math.h> void sincos(double *cosine, double *sine, double x);
This function computes the cosine and the sine of x in a single
call, and stores the results in the addresses pointed to by cosine
and sine, respectively. Since the function exploits a machine
instruction that computes both cosine and sine simultaneously, it is
faster to call sincos
than to call cos
and sin
for
the same argument.
If the absolute value of x is finite but greater than or equal to
2^63, the value stored in *cosine is 1 and the value stored
in *sine is 0 (since for arguments that large each bit of the
mantissa is more than Pi
). If the value of x is infinite
or NaN
, NaN
is stored in both *cosine and
*sine, and errno
is set to EDOM
.
None.
not ANSI, not POSIX
Go to the first, previous, next, last section, table of contents.