summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-19 22:49:03 +0100
committernsz <nsz@port70.net>2012-03-19 22:49:03 +0100
commit01fdfd491b5d83b72099fbae14c4a71ed8e0b945 (patch)
tree323846229fbf834316599adb49210081be2d503a
parent2e8c8fbe7d65ba0026cb084dc8570d94cbc908ff (diff)
downloadmusl-01fdfd491b5d83b72099fbae14c4a71ed8e0b945.tar.gz
fix long double const workaround in cbrtl
-rw-r--r--src/math/cbrtl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/math/cbrtl.c b/src/math/cbrtl.c
index d138b9f2..5297d68f 100644
--- a/src/math/cbrtl.c
+++ b/src/math/cbrtl.c
@@ -118,11 +118,7 @@ long double cbrtl(long double x)
* Round it away from zero to 32 bits (32 so that t*t is exact, and
* away from zero for technical reasons).
*/
- volatile double vd2 = 0x1.0p32;
- volatile double vd1 = 0x1.0p-31;
- #define vd ((long double)vd2 + vd1)
-
- t = dt + vd - 0x1.0p32;
+ t = dt + (0x1.0p32L + 0x1.0p-32L) - 0x1.0p32;
#elif LDBL_MANT_DIG == 113
/*
* Round dt away from zero to 47 bits. Since we don't trust the 47,