sincosf(3)

sincosf3

Sine and cosine functions

Part of sincos(3).

Usage

#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);

Library

Math Library (libm, -lm)

Overview

The sincos(), sincosf(), and sincosl() 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 sin() and cos(). Like sin() and cos(), a large magnitude argument may yield a result with little or no significance.

Return values

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

Releases

23 releases since FreeBSD 11.2-RELEASE; the text changed 10 times.

  1. 11.2
  2. 11.3
  3. 11.4
  4. 12.0
  5. 12.1
  6. 12.2
  7. 12.3
  8. 12.4
  9. 13.0
  10. 13.1–13.2
  11. 13.3–16.0

History

These functions were added to FreeBSD 11.2 to aid in writing various complex function contained in ISO/IEC 9899:1999 (“ISO C99”).

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.