2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
4 .\" <mtk.manpages@gmail.com>
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
8 .\" References consulted:
9 .\" Linux libc source code
10 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
12 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
13 .\" Modified 2002-07-27 by Walter Harms
14 .\" (walter.harms@informatik.uni-oldenburg.de)
15 .TH cos 3 (date) "Linux man-pages (unreleased)"
17 cos, cosf, cosl \- cosine function
20 .RI ( libm ", " \-lm )
25 .BI "double cos(double " x );
26 .BI "float cosf(float " x );
27 .BI "long double cosl(long double " x );
31 Feature Test Macro Requirements for glibc (see
32 .BR feature_test_macros (7)):
38 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
39 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
40 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
43 These functions return the cosine of
50 On success, these functions return the cosine of
55 is a NaN, a NaN is returned.
59 is positive infinity or negative infinity,
60 a domain error occurs,
61 and a NaN is returned.
65 for information on how to determine whether an error has occurred
66 when calling these functions.
68 The following errors can occur:
70 Domain error: \fIx\fP is an infinity
75 An invalid floating-point exception
79 For an explanation of the terms used in this section, see
85 Interface Attribute Value
92 T} Thread safety MT-Safe
104 Before glibc 2.10, the glibc implementation did not set
105 .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6780
109 when a domain error occurred.