projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math cleanup: use 1.0f instead of (float)1.0
[musl]
/
src
/
math
/
expf.c
diff --git
a/src/math/expf.c
b/src/math/expf.c
index
a0eaa7a
..
8925a6f
100644
(file)
--- a/
src/math/expf.c
+++ b/
src/math/expf.c
@@
-85,11
+85,11
@@
float expf(float x)
SET_FLOAT_WORD(twopk, 0x3f800000+((k+100)<<23));
c = x - t*(P1+t*P2);
if (k == 0)
SET_FLOAT_WORD(twopk, 0x3f800000+((k+100)<<23));
c = x - t*(P1+t*P2);
if (k == 0)
- return one - ((x*c)/(c
-(float)2.0)-
x);
- y = one - ((lo
-(x*c)/((float)2.0-c))-
hi);
+ return one - ((x*c)/(c
- 2.0f) -
x);
+ y = one - ((lo
- (x*c)/(2.0f - c)) -
hi);
if (k < -125)
return y*twopk*twom100;
if (k == 128)
if (k < -125)
return y*twopk*twom100;
if (k == 128)
- return y*2.0
F*0x1p127F
;
+ return y*2.0
f*0x1p127f
;
return y*twopk;
}
return y*twopk;
}