1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .TH SINCOS 3 2015-03-02 "GNU" "Linux Programmer's Manual"
11 sincos, sincosf, sincosl \- calculate sin and cos simultaneously
14 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
17 .BI "void sincos(double " x ", double *" sin ", double *" cos );
18 .BI "void sincosf(float " x ", float *" sin ", float *" cos );
19 .BI "void sincosl(long double " x ", long double *" sin ", long double *" cos );
24 Several applications need sine and cosine of the same angle
26 These functions compute both at the same time, and store the results in
41 is positive infinity or negative infinity,
42 a domain error occurs, and
48 These functions return
53 for information on how to determine whether an error has occurred
54 when calling these functions.
56 The following errors can occur:
58 Domain error: \fIx\fP is an infinity
62 An invalid floating-point exception
66 These functions do not set
68 .\" FIXME . Is it intentional that these functions do not set errno?
69 .\" sin() and cos() also don't set errno; bugs have been raised for
71 .\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467
73 These functions first appeared in glibc in version 2.1.
75 For an explanation of the terms used in this section, see
81 Interface Attribute Value
86 T} Thread safety MT-Safe
89 These functions are GNU extensions.