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.
This commit is contained in:
Michael Kerrisk 2008-08-01 05:26:43 +00:00
parent 1f985ccf8f
commit 932070362d
1 changed files with 55 additions and 10 deletions

View File

@ -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),