diff options
author | nsz <nsz@port70.net> | 2012-03-19 23:30:45 +0100 |
---|---|---|
committer | nsz <nsz@port70.net> | 2012-03-19 23:30:45 +0100 |
commit | 4caa17b2a17d136efedfb63fceef832401063d70 (patch) | |
tree | 960f507b4ab31bfb314fc0466bcf26f7a9ca31da /src/math/fmodf.c | |
parent | 75483499dad38b97f5dabb710635e6a8bbbb1c84 (diff) | |
download | musl-4caa17b2a17d136efedfb63fceef832401063d70.tar.gz musl-4caa17b2a17d136efedfb63fceef832401063d70.tar.bz2 musl-4caa17b2a17d136efedfb63fceef832401063d70.tar.xz musl-4caa17b2a17d136efedfb63fceef832401063d70.zip |
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/fmodf.c')
-rw-r--r-- | src/math/fmodf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/math/fmodf.c b/src/math/fmodf.c index 4b50a3d3..837e9371 100644 --- a/src/math/fmodf.c +++ b/src/math/fmodf.c @@ -20,7 +20,7 @@ #include "libm.h" -static const float one = 1.0, Zero[] = {0.0, -0.0,}; +static const float Zero[] = {0.0, -0.0,}; float fmodf(float x, float y) { @@ -99,7 +99,6 @@ float fmodf(float x, float y) n = -126 - iy; hx >>= n; SET_FLOAT_WORD(x, hx|sx); - x *= one; /* create necessary signal */ } return x; /* exact output */ } |