about summary refs log tree commit diff
path: root/src/math/expf.c
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-13 20:24:23 +0100
committernsz <nsz@port70.net>2012-03-13 20:24:23 +0100
commit8d0a6f7a1c47b280647f292e6864b85b72c71f2e (patch)
tree949de14dac812cbd118fdb8fc8d9941790ab2397 /src/math/expf.c
parent9560b6b152efeb23cc4e570dbaea5ef333ac971f (diff)
downloadmusl-8d0a6f7a1c47b280647f292e6864b85b72c71f2e.tar.gz
musl-8d0a6f7a1c47b280647f292e6864b85b72c71f2e.tar.xz
musl-8d0a6f7a1c47b280647f292e6864b85b72c71f2e.zip
math cleanup: use 1.0f instead of (float)1.0
Diffstat (limited to 'src/math/expf.c')
-rw-r--r--src/math/expf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/math/expf.c b/src/math/expf.c
index a0eaa7a7..8925a6f1 100644
--- 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)
-		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)
-		return y*2.0F*0x1p127F;
+		return y*2.0f*0x1p127f;
 	return y*twopk;
 }