summaryrefslogtreecommitdiff
path: root/src/math/fmod.c
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-19 23:30:45 +0100
committernsz <nsz@port70.net>2012-03-19 23:30:45 +0100
commit4caa17b2a17d136efedfb63fceef832401063d70 (patch)
tree960f507b4ab31bfb314fc0466bcf26f7a9ca31da /src/math/fmod.c
parent75483499dad38b97f5dabb710635e6a8bbbb1c84 (diff)
downloadmusl-4caa17b2a17d136efedfb63fceef832401063d70.tar.gz
don't try to create non-standard denormalization signal
Underflow exception is only raised when the result is invalid, but fmod is always exact. x87 has a denormalization exception, but that's nonstandard. And the superflous *1.0 will be optimized away by any compiler that does not honor signaling nans.
Diffstat (limited to 'src/math/fmod.c')
-rw-r--r--src/math/fmod.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/math/fmod.c b/src/math/fmod.c
index 6856844e..84a1b4ac 100644
--- a/src/math/fmod.c
+++ b/src/math/fmod.c
@@ -17,7 +17,7 @@
#include "libm.h"
-static const double one = 1.0, Zero[] = {0.0, -0.0,};
+static const double Zero[] = {0.0, -0.0,};
double fmod(double x, double y)
{
@@ -140,7 +140,6 @@ double fmod(double x, double y)
lx = hx>>(n-32); hx = sx;
}
INSERT_WORDS(x, hx|sx, lx);
- x *= one; /* create necessary signal */
}
return x; /* exact output */
}