diff options
Diffstat (limited to 'lib/msun/src')
-rw-r--r-- | lib/msun/src/s_log1p.c | 9 | ||||
-rw-r--r-- | lib/msun/src/s_log1pf.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lib/msun/src/s_log1p.c b/lib/msun/src/s_log1p.c index 0ee69a6..1af5892 100644 --- a/lib/msun/src/s_log1p.c +++ b/lib/msun/src/s_log1p.c @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); /* double log1p(double x) * @@ -79,6 +78,8 @@ static char rcsid[] = "$FreeBSD$"; * See HP-15C Advanced Functions Handbook, p.193. */ +#include <float.h> + #include "math.h" #include "math_private.h" @@ -124,7 +125,7 @@ log1p(double x) if (hx >= 0x7ff00000) return x+x; if(k!=0) { if(hx<0x43400000) { - u = 1.0+x; + STRICT_ASSIGN(double,u,1.0+x); GET_HIGH_WORD(hu,u); k = (hu>>20)-1023; c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */ diff --git a/lib/msun/src/s_log1pf.c b/lib/msun/src/s_log1pf.c index eb0f4af..6b2fbc7 100644 --- a/lib/msun/src/s_log1pf.c +++ b/lib/msun/src/s_log1pf.c @@ -13,9 +13,10 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <float.h> #include "math.h" #include "math_private.h" @@ -62,7 +63,7 @@ log1pf(float x) if (hx >= 0x7f800000) return x+x; if(k!=0) { if(hx<0x5a000000) { - *(volatile float *)&u = (float)1.0+x; + STRICT_ASSIGN(float,u,(float)1.0+x); GET_FLOAT_WORD(hu,u); k = (hu>>23)-127; /* correction term */ |