Updated: 2022/Sep/29

Please read Privacy Policy. It's for your privacy.

SINCOS(3) Library Functions Manual SINCOS(3)NAMEsincos,sincosf,sincosl- sine and cosine functionsLIBRARYMath Library (libm, -lm)SYNOPSIS#include<math.h>voidsincos(double x, double *s, double *c); voidsincosf(float x, float *s, float *c); voidsincosl(long double x, long double *s, long double *c);DESCRIPTIONThesincos(),sincosf(), andsincosl() functions compute the sine and cosine of x. Using these functions allows argument reduction to occur only once instead of twice with individual invocations ofsin() andcos(). Likesin() andcos(), a large magnitude argument may yield a result with little or no significance.RETURNVALUESUpon returning fromsincos(),sincosf(), andsincosl(), the memory pointed to by *s and *c are assigned the values of sine and cosine, respectively.SEE ALSOcos(3), sin(3),HISTORYThese functions were added to FreeBSD 9.0 and NetBSD 10.0 to aid in writing various complex function contained in ISO/IEC 9899:1999 ("ISO C99"). NetBSD 9.99 March 12, 2011 NetBSD 9.99