]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
93207036 MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
fea681da | 4 | .\" |
5fbde956 | 5 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
6 | .\" |
7 | .\" References consulted: | |
8 | .\" Linux libc source code | |
9 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
10 | .\" 386BSD man pages | |
11 | .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) | |
12 | .\" Modified 2002-07-27 by Walter Harms | |
13 | .\" (walter.harms@informatik.uni-oldenburg.de) | |
7848c0dc | 14 | .\" |
ab47278f | 15 | .TH SIN 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
16 | .SH NAME |
17 | sin, sinf, sinl \- sine function | |
f474752a AC |
18 | .SH LIBRARY |
19 | Math library | |
8fc3b2cf | 20 | .RI ( libm ", " \-lm ) |
fea681da MK |
21 | .SH SYNOPSIS |
22 | .nf | |
23 | .B #include <math.h> | |
68e4db0a | 24 | .PP |
fea681da | 25 | .BI "double sin(double " x ); |
fea681da | 26 | .BI "float sinf(float " x ); |
fea681da MK |
27 | .BI "long double sinl(long double " x ); |
28 | .fi | |
68e4db0a | 29 | .PP |
d39ad78f | 30 | .RS -4 |
93207036 MK |
31 | Feature Test Macro Requirements for glibc (see |
32 | .BR feature_test_macros (7)): | |
d39ad78f | 33 | .RE |
68e4db0a | 34 | .PP |
93207036 MK |
35 | .BR sinf (), |
36 | .BR sinl (): | |
9d2adbae | 37 | .nf |
5c10d2c5 | 38 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
9d2adbae MK |
39 | || /* Since glibc 2.19: */ _DEFAULT_SOURCE |
40 | || /* Glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE | |
41 | .fi | |
fea681da | 42 | .SH DESCRIPTION |
5600f73a | 43 | These functions return the sine of |
022671eb MK |
44 | .IR x , |
45 | where | |
46 | .I x | |
47 | is | |
fea681da | 48 | given in radians. |
93207036 MK |
49 | .SH RETURN VALUE |
50 | On success, these functions return the sine of | |
51 | .IR x . | |
847e0d88 | 52 | .PP |
93207036 MK |
53 | If |
54 | .I x | |
55 | is a NaN, a NaN is returned. | |
847e0d88 | 56 | .PP |
93207036 MK |
57 | If |
58 | .I x | |
59 | is positive infinity or negative infinity, | |
efe294cb | 60 | a domain error occurs, |
93207036 MK |
61 | and a NaN is returned. |
62 | .\" | |
63 | .\" POSIX.1 allows an optional range error for subnormal x | |
64 | .\" glibc 2.8 doesn't do this | |
65 | .SH ERRORS | |
66 | See | |
67 | .BR math_error (7) | |
68 | for information on how to determine whether an error has occurred | |
69 | when calling these functions. | |
70 | .PP | |
71 | The following errors can occur: | |
72 | .TP | |
73 | Domain error: \fIx\fP is an infinity | |
7848c0dc MK |
74 | .I errno |
75 | is set to | |
1ae6b2c7 | 76 | .B EDOM |
7848c0dc | 77 | (but see BUGS). |
93207036 MK |
78 | An invalid floating-point exception |
79 | .RB ( FE_INVALID ) | |
80 | is raised. | |
8cceed69 | 81 | .SH ATTRIBUTES |
df3ccbc4 PH |
82 | For an explanation of the terms used in this section, see |
83 | .BR attributes (7). | |
c466875e MK |
84 | .ad l |
85 | .nh | |
df3ccbc4 PH |
86 | .TS |
87 | allbox; | |
c466875e | 88 | lbx lb lb |
df3ccbc4 PH |
89 | l l l. |
90 | Interface Attribute Value | |
91 | T{ | |
8cceed69 PH |
92 | .BR sin (), |
93 | .BR sinf (), | |
8cceed69 | 94 | .BR sinl () |
df3ccbc4 PH |
95 | T} Thread safety MT-Safe |
96 | .TE | |
c466875e MK |
97 | .hy |
98 | .ad | |
99 | .sp 1 | |
3113c7f3 | 100 | .SH STANDARDS |
9a74e018 | 101 | C99, POSIX.1-2001, POSIX.1-2008. |
847e0d88 | 102 | .PP |
93207036 MK |
103 | The variant returning |
104 | .I double | |
105 | also conforms to | |
68e1685c | 106 | SVr4, 4.3BSD, C89. |
7848c0dc MK |
107 | .SH BUGS |
108 | Before version 2.10, the glibc implementation did not set | |
109 | .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781 | |
110 | .I errno | |
111 | to | |
112 | .B EDOM | |
113 | when a domain error occurred. | |
47297adb | 114 | .SH SEE ALSO |
fea681da MK |
115 | .BR acos (3), |
116 | .BR asin (3), | |
117 | .BR atan (3), | |
118 | .BR atan2 (3), | |
119 | .BR cos (3), | |
f0c34053 | 120 | .BR csin (3), |
baf17bc4 | 121 | .BR sincos (3), |
fea681da | 122 | .BR tan (3) |