]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/sin.3
man*/: ffix (un-bracket tables)
[thirdparty/man-pages.git] / man3 / sin.3
1 '\" t
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>
5 .\"
6 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .\"
8 .\" References consulted:
9 .\" Linux libc source code
10 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
11 .\" 386BSD man pages
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 .\"
16 .TH sin 3 (date) "Linux man-pages (unreleased)"
17 .SH NAME
18 sin, sinf, sinl \- sine function
19 .SH LIBRARY
20 Math library
21 .RI ( libm ", " \-lm )
22 .SH SYNOPSIS
23 .nf
24 .B #include <math.h>
25 .PP
26 .BI "double sin(double " x );
27 .BI "float sinf(float " x );
28 .BI "long double sinl(long double " x );
29 .fi
30 .PP
31 .RS -4
32 Feature Test Macro Requirements for glibc (see
33 .BR feature_test_macros (7)):
34 .RE
35 .PP
36 .BR sinf (),
37 .BR sinl ():
38 .nf
39 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
40 || /* Since glibc 2.19: */ _DEFAULT_SOURCE
41 || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
42 .fi
43 .SH DESCRIPTION
44 These functions return the sine of
45 .IR x ,
46 where
47 .I x
48 is
49 given in radians.
50 .SH RETURN VALUE
51 On success, these functions return the sine of
52 .IR x .
53 .PP
54 If
55 .I x
56 is a NaN, a NaN is returned.
57 .PP
58 If
59 .I x
60 is positive infinity or negative infinity,
61 a domain error occurs,
62 and a NaN is returned.
63 .\"
64 .\" POSIX.1 allows an optional range error for subnormal x
65 .\" glibc 2.8 doesn't do this
66 .SH ERRORS
67 See
68 .BR math_error (7)
69 for information on how to determine whether an error has occurred
70 when calling these functions.
71 .PP
72 The following errors can occur:
73 .TP
74 Domain error: \fIx\fP is an infinity
75 .I errno
76 is set to
77 .B EDOM
78 (but see BUGS).
79 An invalid floating-point exception
80 .RB ( FE_INVALID )
81 is raised.
82 .SH ATTRIBUTES
83 For an explanation of the terms used in this section, see
84 .BR attributes (7).
85 .TS
86 allbox;
87 lbx lb lb
88 l l l.
89 Interface Attribute Value
90 T{
91 .na
92 .nh
93 .BR sin (),
94 .BR sinf (),
95 .BR sinl ()
96 T} Thread safety MT-Safe
97 .TE
98 .sp 1
99 .SH STANDARDS
100 C11, POSIX.1-2008.
101 .SH HISTORY
102 C99, POSIX.1-2001.
103 .PP
104 The variant returning
105 .I double
106 also conforms to
107 SVr4, 4.3BSD, C89.
108 .SH BUGS
109 Before glibc 2.10, the glibc implementation did not set
110 .\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6781
111 .I errno
112 to
113 .B EDOM
114 when a domain error occurred.
115 .SH SEE ALSO
116 .BR acos (3),
117 .BR asin (3),
118 .BR atan (3),
119 .BR atan2 (3),
120 .BR cos (3),
121 .BR csin (3),
122 .BR sincos (3),
123 .BR tan (3)