X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/4b93661e727b5b04f9a089b34dd3ef413cc6666e..ae59e04cb5f746d72d5e3e8c84dad7862c9b50e7:/usr/src/lib/libc/gen/frexp.3 diff --git a/usr/src/lib/libc/gen/frexp.3 b/usr/src/lib/libc/gen/frexp.3 index 906e89589d..1d43d369da 100644 --- a/usr/src/lib/libc/gen/frexp.3 +++ b/usr/src/lib/libc/gen/frexp.3 @@ -1,43 +1,55 @@ -.\" @(#)frexp.3 6.1 (Berkeley) %G% +.\" Copyright (c) 1991 The Regents of the University of California. +.\" All rights reserved. .\" -.TH FREXP 3 "" -.AT 3 -.SH NAME -frexp, ldexp, modf \- split into mantissa and exponent -.SH SYNOPSIS -.nf -.B double frexp(value, eptr) -.B double value; -.B int *eptr; -.PP -.B double ldexp(value, exp) -.B double value; -.PP -.B double modf(value, iptr) -.B double value, *iptr; -.SH DESCRIPTION -.I Frexp -returns the mantissa of a double -.I value -as a double quantity, -.I x, -of magnitude less than 1 -and stores an integer -.I n +.\" %sccs.include.redist.man% +.\" +.\" @(#)frexp.3 6.4 (Berkeley) %G% +.\" +.Dd +.Dt FREXP 3 +.Os +.Sh NAME +.Nm frexp +.Nd convert floating-point number to fractional and integral components +.Sh SYNOPSIS +.Fd #include +.Ft double +.Fn frexp "double value" "int *exp" +.Sh DESCRIPTION +The +.Fn frexp +function breaks a floating-point number into a normalized +fraction and an integral power of 2. +It stores the integer in the +.Em int +object pointed to by +.Fa exp . +.Sh RETURN VALUES +The +.Fn frexp +function returns the value +.Em x , such that -.I value -= -\fIx\fP\|\(**\|2\u\fIn\fP\d -indirectly through -.I eptr. -.PP -.I Ldexp -returns the quantity -\fIvalue\|\(**\|2\u\fIexp\fP\d. -.PP -.I Modf -returns the positive fractional part of -.I value -and stores the integer part indirectly -through -.I iptr. +.Em x +is a +.Em double +with magnitude in the interval +.Bq 1/2 , 1 +or zero, and +.Fa value +equals +.Em x +times 2 raised to the power +.Fa *exp . +If +.Fa value +is zero, both parts of the result are zero. +.Sh SEE ALSO +.Xr ldexp 3 , +.Xr modf 3 , +.Xr math 3 +.Sh STANDARDS +The +.Fn frexp +function conforms to +.St -ansiC .