]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/sin.3
dist.mk, All pages: .TH: Generate date at 'make dist'
[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.\"
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
17sin, sinf, sinl \- sine function
f474752a
AC
18.SH LIBRARY
19Math 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
31Feature 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 43These functions return the sine of
022671eb
MK
44.IR x ,
45where
46.I x
47is
fea681da 48given in radians.
93207036
MK
49.SH RETURN VALUE
50On success, these functions return the sine of
51.IR x .
847e0d88 52.PP
93207036
MK
53If
54.I x
55is a NaN, a NaN is returned.
847e0d88 56.PP
93207036
MK
57If
58.I x
59is positive infinity or negative infinity,
efe294cb 60a domain error occurs,
93207036
MK
61and 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
66See
67.BR math_error (7)
68for information on how to determine whether an error has occurred
69when calling these functions.
70.PP
71The following errors can occur:
72.TP
73Domain error: \fIx\fP is an infinity
7848c0dc
MK
74.I errno
75is set to
1ae6b2c7 76.B EDOM
7848c0dc 77(but see BUGS).
93207036
MK
78An invalid floating-point exception
79.RB ( FE_INVALID )
80is raised.
8cceed69 81.SH ATTRIBUTES
df3ccbc4
PH
82For 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
87allbox;
c466875e 88lbx lb lb
df3ccbc4
PH
89l l l.
90Interface Attribute Value
91T{
8cceed69
PH
92.BR sin (),
93.BR sinf (),
8cceed69 94.BR sinl ()
df3ccbc4
PH
95T} Thread safety MT-Safe
96.TE
c466875e
MK
97.hy
98.ad
99.sp 1
3113c7f3 100.SH STANDARDS
9a74e018 101C99, POSIX.1-2001, POSIX.1-2008.
847e0d88 102.PP
93207036
MK
103The variant returning
104.I double
105also conforms to
68e1685c 106SVr4, 4.3BSD, C89.
7848c0dc
MK
107.SH BUGS
108Before version 2.10, the glibc implementation did not set
109.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781
110.I errno
111to
112.B EDOM
113when 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)