diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/msun/Makefile | 4 | ||||
-rw-r--r-- | lib/msun/man/ieee_test.3 | 20 | ||||
-rw-r--r-- | lib/msun/man/ilogb.3 | 54 | ||||
-rw-r--r-- | lib/msun/man/math.3 | 3 |
4 files changed, 48 insertions, 33 deletions
diff --git a/lib/msun/Makefile b/lib/msun/Makefile index b6452c6..28f3db2 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -129,10 +129,10 @@ MLINKS+=fmax.3 fmaxf.3 fmax.3 fmaxl.3 \ fmax.3 fmin.3 fmax.3 fminf.3 fmax.3 fminl.3 MLINKS+=fmod.3 fmodf.3 MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 hypotf.3 -MLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3 MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3 MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3 -MLINKS+=ilogb.3 ilogbf.3 ilogb.3 ilogbl.3 +MLINKS+=ilogb.3 ilogbf.3 ilogb.3 ilogbl.3 \ + ilogb.3 logb.3 ilogb.3 logbf.3 MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 lgamma.3 tgamma.3 diff --git a/lib/msun/man/ieee_test.3 b/lib/msun/man/ieee_test.3 index 986fd08..50ea23c 100644 --- a/lib/msun/man/ieee_test.3 +++ b/lib/msun/man/ieee_test.3 @@ -32,12 +32,10 @@ .\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd March 10, 1994 +.Dd Nov 6, 2005 .Dt IEEE_TEST 3 .Os .Sh NAME -.Nm logb , -.Nm logbf , .Nm scalb , .Nm scalbf , .Nm significand , @@ -48,10 +46,6 @@ .Sh SYNOPSIS .In math.h .Ft double -.Fn logb "double x" -.Ft float -.Fn logbf "float x" -.Ft double .Fn scalb "double x" "double n" .Ft float .Fn scalbf "float x" "float n" @@ -64,18 +58,6 @@ These functions allow users to test conformance to .St -ieee754 . Their use is not otherwise recommended. .Pp -.Fn logb x -and -.Fn logbf x -return -.Fa x Ns 's exponent -.Fa n , -a signed integer converted to double\-precision floating\-point. -.Fn logb \*(Pm\*(If -= +\*(If; -.Fn logb 0 -= -\*(If with a division by zero exception. -.Pp .Fn scalb x n and .Fn scalbf x n diff --git a/lib/msun/man/ilogb.3 b/lib/msun/man/ilogb.3 index 401e86d..1de5f8c 100644 --- a/lib/msun/man/ilogb.3 +++ b/lib/msun/man/ilogb.3 @@ -32,13 +32,15 @@ .\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd Nov 6, 2005 .Dt ILOGB 3 .Os .Sh NAME .Nm ilogb , .Nm ilogbf , -.Nm ilogbl +.Nm ilogbl , +.Nm logb , +.Nm logbf .Nd extract exponent .Sh LIBRARY .Lb libm @@ -50,24 +52,40 @@ .Fn ilogbf "float x" .Ft int .Fn ilogbl "long double x" +.Ft double +.Fn logb "double x" +.Ft float +.Fn logbf "float x" .Sh DESCRIPTION .Fn ilogb , .Fn ilogbf and .Fn ilogbl return -.Fa x Ns 's exponent, +.Fa x Ns 's exponent in integer format. .Fn ilogb \*(Pm\*(If returns .Dv INT_MAX , .Fn ilogb \*(Pm\*(Na returns -.Dv FP_ILOGBNAN +.Dv FP_ILOGBNAN , and .Fn ilogb 0 returns .Dv FP_ILOGB0 . +.Pp +.Fn logb x +and +.Fn logbf x +return +.Fa x Ns 's exponent +in floating\-point format with the same precision as +.Fa x . +.Fn logb \*(Pm\*(If +returns +\*(If, and +.Fn logb 0 +returns -\*(If with a division by zero exception. .Sh SEE ALSO .Xr frexp 3 , .Xr ieee 3 , @@ -77,19 +95,33 @@ returns The .Fn ilogb , .Fn ilogbf , +.Fn ilogbl , +.Fn logb and -.Fn ilogbl +.Fn logbf routines conform to .St -isoC-99 . -They provide functionality similar to the Logb function recommended by +.Fn logb +and +.Fn logbf +implement the logb function recommended by .St -ieee754 . .Sh HISTORY The +.Fn logb +function appeared in +.Bx 4.3 . +The .Fn ilogb -and +function appeared in +.Fx 1.1.5 . +The .Fn ilogbf -functions appeared in -.Bx 4.3 and -.Fx 2.0 , -respectively. +.Fn logbf +functions appeared in +.Fx 2.0 . +The +.Fn ilogbl +function appeared in +.Fx 5.4 . diff --git a/lib/msun/man/math.3 b/lib/msun/man/math.3 index a0d1fde..db3a666 100644 --- a/lib/msun/man/math.3 +++ b/lib/msun/man/math.3 @@ -32,7 +32,7 @@ .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 .\" $FreeBSD$ .\" -.Dd April 5, 2005 +.Dd Nov 6, 2005 .Dt MATH 3 .Os .if n \{\ @@ -97,6 +97,7 @@ isnormal determine whether a value is normalized frexp extract exponent and mantissa ilogb extract exponent ldexp multiply by power of 2 +logb extract exponent scalbln adjust exponent scalbn adjust exponent .El |