about summary refs log tree commit diff
path: root/src/math/log2f.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/log2f.c')
-rw-r--r--src/math/log2f.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/log2f.c b/src/math/log2f.c
index a968984d..c9b9282c 100644
--- a/src/math/log2f.c
+++ b/src/math/log2f.c
@@ -51,8 +51,8 @@ float log2f(float x)
 	SET_FLOAT_WORD(x, hx|(i^0x3f800000));  /* normalize x or x/2 */
 	k += i>>23;
 	y = (float)k;
-	f = x - (float)1.0;
-	hfsq = (float)0.5*f*f;
+	f = x - 1.0f;
+	hfsq = 0.5f * f * f;
 	r = __log1pf(f);
 
 	/*