summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-03-29 16:19:35 +0000
committerdas <das@FreeBSD.org>2008-03-29 16:19:35 +0000
commitede66e5dafa42c4ec185d0ba4211d2cb809710c0 (patch)
tree86ac3f7598e4cc611d34d3e81b417709e9dbc0ba
parent0ffc2929eeece8d598a50872502f467f4eec2ac4 (diff)
downloadFreeBSD-src-ede66e5dafa42c4ec185d0ba4211d2cb809710c0.zip
FreeBSD-src-ede66e5dafa42c4ec185d0ba4211d2cb809710c0.tar.gz
Document modff() and modfl(). Technically, modff() and modfl()
live in libm, while modf() lives in libc due to historical mistakes. I'm claiming in the manpage that they all live in libm, since programmers should not rely on the mistake.
-rw-r--r--lib/libc/gen/Makefile.inc1
-rw-r--r--lib/libc/gen/modf.334
2 files changed, 23 insertions, 12 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 968b318..5695d7a 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -120,6 +120,7 @@ MLINKS+=isgreater.3 isgreaterequal.3 isgreater.3 isless.3 \
isgreater.3 isunordered.3
MLINKS+=ldexp.3 ldexpf.3 ldexp.3 ldexpl.3
MLINKS+=makecontext.3 swapcontext.3
+MLINKS+=modf.3 modff.3 modf.3 modfl.3
MLINKS+=popen.3 pclose.3
MLINKS+=psignal.3 strsignal.3 psignal.3 sys_siglist.3 psignal.3 sys_signame.3
MLINKS+=pwcache.3 group_from_gid.3 pwcache.3 user_from_uid.3
diff --git a/lib/libc/gen/modf.3 b/lib/libc/gen/modf.3
index f406ced..a3ee527 100644
--- a/lib/libc/gen/modf.3
+++ b/lib/libc/gen/modf.3
@@ -32,33 +32,40 @@
.\" @(#)modf.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd March 29, 2008
.Dt MODF 3
.Os
.Sh NAME
-.Nm modf
+.Nm modf ,
+.Nm modff ,
+.Nm modfl
.Nd extract signed integral and fractional values from floating-point number
.Sh LIBRARY
-.Lb libc
+.Lb libm
.Sh SYNOPSIS
.In math.h
.Ft double
.Fn modf "double value" "double *iptr"
+.Ft float
+.Fn modff "float value" "float *iptr"
+.Ft long double
+.Fn modfl "long double value" "long double *iptr"
.Sh DESCRIPTION
The
-.Fn modf
-function breaks the argument
+.Fn modf ,
+.Fn modff ,
+and
+.Fn modfl
+functions break the argument
.Fa value
into integral and fractional parts, each of which has the
same sign as the argument.
It stores the integral part as a
-.Vt double
+floating point number
in the object pointed to by
.Fa iptr .
.Sh RETURN VALUES
-The
-.Fn modf
-function returns the signed fractional part of
+These functions return the signed fractional part of
.Fa value .
.Sh SEE ALSO
.Xr frexp 3 ,
@@ -66,6 +73,9 @@ function returns the signed fractional part of
.Xr math 3
.Sh STANDARDS
The
-.Fn modf
-function conforms to
-.St -isoC .
+.Fn modf ,
+.Fn modff ,
+and
+.Fn modfl
+functions conform to
+.St -isoC-99 .
OpenPOWER on IntegriCloud