diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-21 19:12:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-21 19:12:22 +0000 |
commit | 403a6325787939b65642bb7eb133088a8a23d4a6 (patch) | |
tree | 6d5b388ef9fa31d1930221e388a96e4970f65ad5 /sysdeps/ieee754/flt-32/s_expm1f.c | |
parent | 2fdaad97bed9e099f09b5268edb1783254435e9d (diff) | |
download | glibc-403a6325787939b65642bb7eb133088a8a23d4a6.zip glibc-403a6325787939b65642bb7eb133088a8a23d4a6.tar.gz glibc-403a6325787939b65642bb7eb133088a8a23d4a6.tar.bz2 |
* sysdeps/ieee754/dbl-64/halfulp.c: Mark tab54 as static and const.
* sysdeps/i386/fpu/e_expl.c: Mark c0 and c1 as const.
* sysdeps/ieee754/flt-32/s_expm1f.c: Make sure huge and tiny end
up in .rodata.
* sysdeps/ieee754/flt-32/e_exp2f.c: Make sure TWO127 and TWOM100
end up in .rodata.
* sysdeps/ieee754/flt-32/e_expf.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp2.c: Make sure TWO1023 and TWOM1000
end up in .rodata.
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_expm1f.c')
-rw-r--r-- | sysdeps/ieee754/flt-32/s_expm1f.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sysdeps/ieee754/flt-32/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c index 375e334..7d32dbb 100644 --- a/sysdeps/ieee754/flt-32/s_expm1f.c +++ b/sysdeps/ieee754/flt-32/s_expm1f.c @@ -8,7 +8,7 @@ * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -20,7 +20,15 @@ static char rcsid[] = "$NetBSD: s_expm1f.c,v 1.5 1995/05/10 20:47:11 jtc Exp $"; #include "math.h" #include "math_private.h" -static const volatile float huge = 1.0e+30, tiny = 1.0e-30; +/* XXX I know the assembler generates a warning about incorrect section + attributes. But without the attribute here the compiler places the + constants in the .data section. Ideally the constant is placed in + .rodata.cst4 so that it can be merged, but gcc sucks, it ICEs when + we try to force this section on it. --drepper */ +static const volatile float huge __attribute__ ((section (".rodata"))) + = 1.0e+30; +static const volatile float tiny __attribute__ ((section (".rodata"))) + = 1.0e-30; #ifdef __STDC__ static const float @@ -71,7 +79,7 @@ Q5 = -2.0109921195e-07; /* 0xb457edbb */ } /* argument reduction */ - if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */ + if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */ if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */ if(xsb==0) {hi = x - ln2_hi; lo = ln2_lo; k = 1;} @@ -85,10 +93,10 @@ Q5 = -2.0109921195e-07; /* 0xb457edbb */ } x = hi - lo; c = (hi-x)-lo; - } + } else if(hx < 0x33000000) { /* when |x|<2**-25, return x */ t = huge+x; /* return x with inexact flags when x!=0 */ - return x - (t-(huge+x)); + return x - (t-(huge+x)); } else k = 0; |