projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove spurious inclusion of libc.h for LFS64 ABI aliases
[musl]
/
src
/
math
/
expf.c
diff --git
a/src/math/expf.c
b/src/math/expf.c
index
5572bbf
..
feee2b0
100644
(file)
--- a/
src/math/expf.c
+++ b/
src/math/expf.c
@@
-39,9
+39,11
@@
float expf(float x)
/* special cases */
if (hx >= 0x42aeac50) { /* if |x| >= -87.33655f or NaN */
/* special cases */
if (hx >= 0x42aeac50) { /* if |x| >= -87.33655f or NaN */
+ if (hx > 0x7f800000) /* NaN */
+ return x;
if (hx >= 0x42b17218 && !sign) { /* x >= 88.722839f */
/* overflow */
if (hx >= 0x42b17218 && !sign) { /* x >= 88.722839f */
/* overflow */
-
STRICT_ASSIGN(float, x, x * 0x1p127f)
;
+
x *= 0x1p127f
;
return x;
}
if (sign) {
return x;
}
if (sign) {
@@
-60,7
+62,7
@@
float expf(float x)
k = 1 - sign - sign;
hi = x - k*ln2hi; /* k*ln2hi is exact here */
lo = k*ln2lo;
k = 1 - sign - sign;
hi = x - k*ln2hi; /* k*ln2hi is exact here */
lo = k*ln2lo;
-
STRICT_ASSIGN(float, x, hi - lo)
;
+
x = hi - lo
;
} else if (hx > 0x39000000) { /* |x| > 2**-14 */
k = 0;
hi = x;
} else if (hx > 0x39000000) { /* |x| > 2**-14 */
k = 0;
hi = x;