1SINCOS(3)                  Linux Programmer's Manual                 SINCOS(3)
2
3
4

NAME

6       sincos, sincosf, sincosl - calculate sin and cos simultaneously
7

SYNOPSIS

9       #define _GNU_SOURCE         /* See feature_test_macros(7) */
10       #include <math.h>
11
12       void sincos(double x, double *sin, double *cos);
13       void sincosf(float x, float *sin, float *cos);
14       void sincosl(long double x, long double *sin, long double *cos);
15
16       Link with -lm.
17

DESCRIPTION

19       Several  applications  need  sine and cosine of the same angle x.  This
20       function computes both at the same time, and stores the results in *sin
21       and *cos.
22
23       If x is a NaN, a NaN is returned in *sin and *cos.
24
25       If  x is positive infinity or negative infinity, a domain error occurs,
26       and a NaN is returned in *sin and *cos.
27

RETURN VALUE

29       These functions return void.
30

ERRORS

32       See math_error(7) for information on how to determine whether an  error
33       has occurred when calling these functions.
34
35       The following errors can occur:
36
37       Domain error: x is an infinity
38              An invalid floating-point exception (FE_INVALID) is raised.
39
40       These functions do not set errno.
41

VERSIONS

43       These functions first appeared in glibc in version 2.1.
44

CONFORMING TO

46       This function is a GNU extension.
47

SEE ALSO

49       cos(3), sin(3), tan(3)
50

COLOPHON

52       This  page  is  part of release 3.53 of the Linux man-pages project.  A
53       description of the project, and information about reporting  bugs,  can
54       be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58GNU                               2008-08-11                         SINCOS(3)
Impressum