From ef3758c4ac350e0bbd3b85584cd9d1849e285906 Mon Sep 17 00:00:00 2001 From: bde Date: Fri, 8 Feb 2008 01:22:13 +0000 Subject: 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(). --- lib/msun/src/s_logb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/msun/src') 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 +__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); } -- cgit v1.1