Debian Codegraph @

upstream/debian-unstable/man3/sin.3

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