SYNOPSIS: Added feature test macro requirements.

RETURN VALUE: Added details for special argument cases.
Added (null) ERRORS section.
CONFORMING TO: Added POSIX.1-2001.
This commit is contained in:
Michael Kerrisk 2008-08-01 05:26:34 +00:00
parent e1520273aa
commit 43595898b0
1 changed files with 32 additions and 7 deletions

View File

@ -28,7 +28,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
.TH MODF 3 2002-07-27 "" "Linux Programmer's Manual"
.TH MODF 3 2008-07-29 "" "Linux Programmer's Manual"
.SH NAME
modf, modff, modfl \- extract signed integral and fractional values from
floating-point number
@ -44,23 +44,48 @@ floating-point number
.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 modf (),
.BR modl ():
_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
.I cc\ -std=c99
.ad b
.SH DESCRIPTION
The
.BR modf ()
function breaks the argument \fIx\fP into an integral
part and a fractional part, each of which has the same sign as \fIx\fP.
The integral part is stored in \fIiptr\fP.
The integral part is stored in the location pointed to by \fIiptr\fP.
.SH "RETURN VALUE"
The
.BR modf ()
function returns the fractional part of \fIx\fP.
If
.I x
is a NaN, a NaN is returned, and
.IR *iptr
is set to a NaN.
If
.I x
is positive infinity (negative infinity), +0 (-0) is returned, and
.IR *iptr
is set to positive infinity (negative infinity).
.SH ERRORS
No errors occur.
.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 frexp (3),
.BR ldexp (3)