diff options
Diffstat (limited to 'lib/msun')
-rw-r--r-- | lib/msun/src/e_pow.c | 9 | ||||
-rw-r--r-- | lib/msun/src/e_powf.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/msun/src/e_pow.c b/lib/msun/src/e_pow.c index 95d0855..4aa00d5 100644 --- a/lib/msun/src/e_pow.c +++ b/lib/msun/src/e_pow.c @@ -9,9 +9,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* __ieee754_pow(x,y) return x**y * @@ -110,10 +109,10 @@ __ieee754_pow(double x, double y) /* y==zero: x**0 = 1 */ if((iy|ly)==0) return one; - /* +-NaN return x+y */ + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0))) - return x+y; + return (x+0.0)+(y+0.0); /* determine if y is an odd int when x < 0 * yisint = 0 ... y is not an integer diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index 09fb59c..fe256a3 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -13,9 +13,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" @@ -68,10 +67,10 @@ __ieee754_powf(float x, float y) /* y==zero: x**0 = 1 */ if(iy==0) return one; - /* +-NaN return x+y */ + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f800000 || iy > 0x7f800000) - return x+y; + return (x+0.0F)+(y+0.0F); /* determine if y is an odd int when x < 0 * yisint = 0 ... y is not an integer |