summaryrefslogtreecommitdiff
path: root/man3/sin.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2008-08-01 05:26:43 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2008-08-01 05:26:43 +0000
commit932070362dc89822c829e6bcd1e68d53adf2fc48 (patch)
tree7d7ae635d84140eac97b1e6cb43c5297c9774611 /man3/sin.3
parent1f985ccf8fe8433088c1a7020e5977b6a9cf4bdc (diff)
SYNOPSIS: Added feature test macro requirements.
Added RETURN VALUE section. Added ERRORS section; noted errno is not set: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781. Updated CONFORMING TO.
Diffstat (limited to 'man3/sin.3')
-rw-r--r--man3/sin.365
1 files changed, 55 insertions, 10 deletions
diff --git a/man3/sin.3 b/man3/sin.3
index e86d64ba..8512c33f 100644
--- a/man3/sin.3
+++ b/man3/sin.3
@@ -1,4 +1,6 @@
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
+.\" <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
@@ -27,7 +29,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH SIN 3 2002-07-27 "" "Linux Programmer's Manual"
+.TH SIN 3 2008-07-29 "" "Linux Programmer's Manual"
.SH NAME
sin, sinf, sinl \- sine function
.SH SYNOPSIS
@@ -42,22 +44,65 @@ sin, sinf, sinl \- sine function
.fi
.sp
Link with \fI\-lm\fP.
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.sp
+.ad l
+.BR sinf (),
+.BR sinl ():
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
+.I cc\ -std=c99
+.ad b
.SH DESCRIPTION
The
.BR sin ()
function returns the sine of \fIx\fP, where \fIx\fP is
given in radians.
-.SH "RETURN VALUE"
-The
-.BR sin ()
-function returns a value between \-1 and 1.
+.SH RETURN VALUE
+On success, these functions return the sine of
+.IR x .
+
+If
+.I x
+is a NaN, a NaN is returned.
+
+If
+.I x
+is positive infinity or negative infinity,
+a "domain error" occurs,
+and a NaN is returned.
+.\"
+.\" POSIX.1 allows an optional range error for subnormal x
+.\" glibc 2.8 doesn't do this
+.SH ERRORS
+See
+.BR math_error (7)
+for information on how to determine whether an error has occurred
+when calling these functions.
+.PP
+The following errors can occur:
+.TP
+Domain error: \fIx\fP is an infinity
+.\" .I errno
+.\" is set to
+.\" .BR EDOM .
+An invalid floating-point exception
+.RB ( FE_INVALID )
+is raised.
+.PP
+These functions do not set
+.IR errno .
+.\" FIXME . Is it intentional that these functions do not set errno?
+.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781
.SH "CONFORMING TO"
+C99, POSIX.1-2001.
+The variant returning
+.I double
+also conforms to
SVr4, 4.3BSD, C89.
-The
-.I float
-and
-.I "long double"
-variants are C99 requirements.
.SH "SEE ALSO"
.BR acos (3),
.BR asin (3),