diff options
author | bde <bde@FreeBSD.org> | 2008-02-08 01:22:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2008-02-08 01:22:13 +0000 |
commit | ef3758c4ac350e0bbd3b85584cd9d1849e285906 (patch) | |
tree | fff49de811bfd90ae89a988622472733e87fb19d /lib/msun/src | |
parent | c614695539ddc5fe3616f7317e14b386fb833160 (diff) | |
download | FreeBSD-src-ef3758c4ac350e0bbd3b85584cd9d1849e285906.zip FreeBSD-src-ef3758c4ac350e0bbd3b85584cd9d1849e285906.tar.gz |
Oops, fix the fix in rev.1.10. logb() and logbf() were broken on
denormals, and logb() remained broken after 1.10 because the fix for
logbf() was incompletely translated.
Convert to __FBSDID().
Diffstat (limited to 'lib/msun/src')
-rw-r--r-- | lib/msun/src/s_logb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/msun/src/s_logb.c b/lib/msun/src/s_logb.c index 4091429..a47e354 100644 --- a/lib/msun/src/s_logb.c +++ b/lib/msun/src/s_logb.c @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* * double logb(x) @@ -38,9 +37,9 @@ logb(double x) if(ix>=0x7ff00000) return x*x; if(ix<0x00100000) { x *= two54; /* convert subnormal x to normal */ - GET_FLOAT_WORD(ix,x); + GET_HIGH_WORD(ix,x); ix &= 0x7fffffff; - return (float) ((ix>>20)-1023-54); + return (double) ((ix>>20)-1023-54); } else return (double) ((ix>>20)-1023); } |