diff options
author | Szabolcs Nagy <nsz@port70.net> | 2013-09-06 18:35:55 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013-09-06 18:35:55 +0000 |
commit | 9b0fcb441a44456c7b071c7cdaf90403f81ec05a (patch) | |
tree | ebb08b777b53c318dc8ba55cd2979a17689843d6 /src/math/log1p.c | |
parent | f657fe4b9f734d7fdea515af8dffbf7c28ce4fbc (diff) | |
download | musl-9b0fcb441a44456c7b071c7cdaf90403f81ec05a.tar.gz musl-9b0fcb441a44456c7b071c7cdaf90403f81ec05a.tar.bz2 musl-9b0fcb441a44456c7b071c7cdaf90403f81ec05a.tar.xz musl-9b0fcb441a44456c7b071c7cdaf90403f81ec05a.zip |
math: remove STRICT_ASSIGN macro
gcc did not always drop excess precision according to c99 at assignments
before version 4.5 even if -std=c99 was requested which caused badly
broken mathematical functions on i386 when FLT_EVAL_METHOD!=0
but STRICT_ASSIGN was not used consistently and it is worked around for
old compilers with -ffloat-store so it is no longer needed
the new convention is to get the compiler respect c99 semantics and when
excess precision is not harmful use float_t or double_t or to specialize
code using FLT_EVAL_METHOD
Diffstat (limited to 'src/math/log1p.c')
-rw-r--r-- | src/math/log1p.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math/log1p.c b/src/math/log1p.c index 9bed63c2..a71ac423 100644 --- a/src/math/log1p.c +++ b/src/math/log1p.c @@ -122,7 +122,7 @@ double log1p(double x) return x+x; if (k != 0) { if (hx < 0x43400000) { - STRICT_ASSIGN(double, u, 1.0 + x); + u = 1 + x; GET_HIGH_WORD(hu, u); k = (hu>>20) - 1023; c = k > 0 ? 1.0-(u-x) : x-(u-1.0); /* correction term */ |