OpenBSD manual page server

Manual Page Search Parameters

SINCOS(3) Library Functions Manual SINCOS(3)

sincos, sincosf, sincoslsine and cosine functions

#include <math.h>

void
sincos(double x, double *s, double *c);

void
sincosf(float x, float *s, float *c);

void
sincosl(long double x, long double *s, long double *c);

The (), (), and () functions compute the sine and cosine of x. Using these functions allows argument reduction to occur only once instead of twice with individual invocations of () and (). Like sin() and cos(), a large magnitude argument may yield a result with little or no significance.

Upon returning from sincos(), sincosf(), and sincosl(), the objects pointed to by s and c are assigned the values of sine and cosine, respectively.

cos(3), sin(3)

These functions first appeared in OpenBSD 6.3.

June 29, 2021 OpenBSD-current