summaryrefslogtreecommitdiff
path: root/src/math/fmodl.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/fmodl.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/fmodl.c')
-rw-r--r--src/math/fmodl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/math/fmodl.c b/src/math/fmodl.c
index 2e3eec1f..b930c49d 100644
--- a/src/math/fmodl.c
+++ b/src/math/fmodl.c
@@ -48,7 +48,7 @@ typedef uint32_t manh_t;
#define MANL_SHIFT (LDBL_MANL_SIZE - 1)
-static const long double one = 1.0, Zero[] = {0.0, -0.0,};
+static const long double Zero[] = {0.0, -0.0,};
/*
* fmodl(x,y)
@@ -153,7 +153,6 @@ long double fmodl(long double x, long double y)
} else {
ux.bits.exp = iy + BIAS;
}
- x = ux.e * one; /* create necessary signal */
- return x; /* exact output */
+ return ux.e; /* exact output */
}
#endif