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 2013-12-23 "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 );
19 .BI "void sincosf(float " x ", float *" sin ", float *" cos );
21 .BI "void sincosl(long double " x ", long double *" sin ", long double *" cos );
26 Several applications need sine and cosine of the same angle
28 This function computes both at the same time, and stores the results in
43 is positive infinity or negative infinity,
44 a domain error occurs, and
50 These functions return
55 for information on how to determine whether an error has occurred
56 when calling these functions.
58 The following errors can occur:
60 Domain error: \fIx\fP is an infinity
64 An invalid floating-point exception
68 These functions do not set
70 .\" FIXME . Is it intentional that these functions do not set errno?
71 .\" sin() and cos() also don't set errno; bugs have been raised for
73 .\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467
75 These functions first appeared in glibc in version 2.1.
77 .SS Multithreading (see pthreads(7))
83 functions are thread-safe.
85 This function is a GNU extension.