From 9b0fcb441a44456c7b071c7cdaf90403f81ec05a Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Fri, 6 Sep 2013 18:35:55 +0000 Subject: 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 --- src/math/exp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/math/exp2.c') diff --git a/src/math/exp2.c b/src/math/exp2.c index 2e078fb0..e14adba5 100644 --- a/src/math/exp2.c +++ b/src/math/exp2.c @@ -340,7 +340,7 @@ double exp2(double x) if (ix >= 0x408ff000) { /* |x| >= 1022 or nan */ if (ix >= 0x40900000 && u.i>>63 == 0) { /* x >= 1024 or nan */ /* overflow */ - STRICT_ASSIGN(double, x, x * 0x1p1023); + x *= 0x1p1023; return x; } if (ix >= 0x7ff00000) /* -inf or -nan */ -- cgit v1.2.1