]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/sin.3
_exit.2, brk.2, abs.3, acos.3, acosh.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3...
[thirdparty/man-pages.git] / man3 / sin.3
CommitLineData
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.\"
93015253 5.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
6.\" Permission is granted to make and distribute verbatim copies of this
7.\" manual provided the copyright notice and this permission notice are
8.\" preserved on all copies.
9.\"
10.\" Permission is granted to copy and distribute modified versions of this
11.\" manual under the conditions for verbatim copying, provided that the
12.\" entire resulting derived work is distributed under the terms of a
13.\" permission notice identical to this one.
c13182ef 14.\"
fea681da
MK
15.\" Since the Linux kernel and libraries are constantly changing, this
16.\" manual page may be incorrect or out-of-date. The author(s) assume no
17.\" responsibility for errors or omissions, or for damages resulting from
18.\" the use of the information contained herein. The author(s) may not
19.\" have taken the same level of care in the production of this manual,
20.\" which is licensed free of charge, as they might when working
21.\" professionally.
c13182ef 22.\"
fea681da
MK
23.\" Formatted or processed versions of this manual, if unaccompanied by
24.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 25.\" %%%LICENSE_END
fea681da
MK
26.\"
27.\" References consulted:
28.\" Linux libc source code
29.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
30.\" 386BSD man pages
31.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
32.\" Modified 2002-07-27 by Walter Harms
33.\" (walter.harms@informatik.uni-oldenburg.de)
7848c0dc 34.\"
c73595c2 35.TH SIN 3 2015-04-19 "" "Linux Programmer's Manual"
fea681da
MK
36.SH NAME
37sin, sinf, sinl \- sine function
38.SH SYNOPSIS
39.nf
40.B #include <math.h>
41.sp
42.BI "double sin(double " x );
d39541ec 43.br
fea681da 44.BI "float sinf(float " x );
d39541ec 45.br
fea681da
MK
46.BI "long double sinl(long double " x );
47.fi
48.sp
20c58d70 49Link with \fI\-lm\fP.
93207036
MK
50.sp
51.in -4n
52Feature Test Macro Requirements for glibc (see
53.BR feature_test_macros (7)):
54.in
55.sp
56.ad l
57.BR sinf (),
58.BR sinl ():
b90c43a8 59.RS 4
e464f054
MK
60_BSD_SOURCE || _SVID_SOURCE || _ISOC99_SOURCE ||
61_POSIX_C_SOURCE\ >=\ 200112L
b90c43a8
MK
62.br
63or
93207036 64.I cc\ -std=c99
b90c43a8
MK
65.RE
66.ad
fea681da 67.SH DESCRIPTION
5600f73a 68These functions return the sine of
022671eb
MK
69.IR x ,
70where
71.I x
72is
fea681da 73given in radians.
93207036
MK
74.SH RETURN VALUE
75On success, these functions return the sine of
76.IR x .
77
78If
79.I x
80is a NaN, a NaN is returned.
81
82If
83.I x
84is positive infinity or negative infinity,
efe294cb 85a domain error occurs,
93207036
MK
86and a NaN is returned.
87.\"
88.\" POSIX.1 allows an optional range error for subnormal x
89.\" glibc 2.8 doesn't do this
90.SH ERRORS
91See
92.BR math_error (7)
93for information on how to determine whether an error has occurred
94when calling these functions.
95.PP
96The following errors can occur:
97.TP
98Domain error: \fIx\fP is an infinity
7848c0dc
MK
99.I errno
100is set to
101.BR EDOM
102(but see BUGS).
93207036
MK
103An invalid floating-point exception
104.RB ( FE_INVALID )
105is raised.
8cceed69 106.SH ATTRIBUTES
df3ccbc4
PH
107For an explanation of the terms used in this section, see
108.BR attributes (7).
109.TS
110allbox;
111lbw21 lb lb
112l l l.
113Interface Attribute Value
114T{
8cceed69
PH
115.BR sin (),
116.BR sinf (),
8cceed69 117.BR sinl ()
df3ccbc4
PH
118T} Thread safety MT-Safe
119.TE
47297adb 120.SH CONFORMING TO
9a74e018 121C99, POSIX.1-2001, POSIX.1-2008.
e05e3635 122
93207036
MK
123The variant returning
124.I double
125also conforms to
68e1685c 126SVr4, 4.3BSD, C89.
7848c0dc
MK
127.SH BUGS
128Before version 2.10, the glibc implementation did not set
129.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781
130.I errno
131to
132.B EDOM
133when a domain error occurred.
47297adb 134.SH SEE ALSO
fea681da
MK
135.BR acos (3),
136.BR asin (3),
137.BR atan (3),
138.BR atan2 (3),
139.BR cos (3),
f0c34053 140.BR csin (3),
baf17bc4 141.BR sincos (3),
fea681da 142.BR tan (3)