about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32/e_expf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-18 15:11:31 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-18 15:11:31 -0400
commitd9a8d0abcc976f7ffe319a376ddd3497486e9726 (patch)
tree8bf41c5c082f4154657e72955711a73dff64dbea /sysdeps/ieee754/flt-32/e_expf.c
parent4855e3ddf5061dd8ddcefafc7185f6f70937434b (diff)
downloadglibc-d9a8d0abcc976f7ffe319a376ddd3497486e9726.tar.gz
glibc-d9a8d0abcc976f7ffe319a376ddd3497486e9726.tar.xz
glibc-d9a8d0abcc976f7ffe319a376ddd3497486e9726.zip
Use new internal libc_fe* interfaces in more functions
Diffstat (limited to 'sysdeps/ieee754/flt-32/e_expf.c')
-rw-r--r--sysdeps/ieee754/flt-32/e_expf.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sysdeps/ieee754/flt-32/e_expf.c b/sysdeps/ieee754/flt-32/e_expf.c
index 872d34bc5b..02105c4385 100644
--- a/sysdeps/ieee754/flt-32/e_expf.c
+++ b/sysdeps/ieee754/flt-32/e_expf.c
@@ -47,9 +47,6 @@
    to perform an 'accurate table method' expf, because of the range reduction
    overhead (compare exp2f).
    */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <float.h>
 #include <ieee754.h>
 #include <math.h>
@@ -60,8 +57,8 @@
 extern const float __exp_deltatable[178];
 extern const double __exp_atable[355] /* __attribute__((mode(DF))) */;
 
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+static const float TWOM100 = 7.88860905e-31;
+static const float TWO127 = 1.7014118346e+38;
 
 float
 __ieee754_expf (float x)
@@ -86,10 +83,7 @@ __ieee754_expf (float x)
       union ieee754_double ex2_u;
       fenv_t oldenv;
 
-      feholdexcept (&oldenv);
-#ifdef FE_TONEAREST
-      fesetround (FE_TONEAREST);
-#endif
+      libc_feholdexcept_setroundf (&oldenv, FE_TONEAREST);
 
       /* Calculate n.  */
       n = x * M_1_LN2 + THREEp22;
@@ -119,7 +113,7 @@ __ieee754_expf (float x)
       x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
 
       /* Return result.  */
-      fesetenv (&oldenv);
+      libc_fesetenvf (&oldenv);
 
       result = x22 * ex2_u.d + ex2_u.d;
       return (float) result;