Module Name:    src
Committed By:   dsl
Date:           Tue Mar 18 21:52:19 UTC 2014

Modified Files:
        src/lib/libm/src: s_exp2.c

Log Message:
Change 'i0' to be signed so that the sign bit is preserved on 'k'
  and the code at the bottom splits the multiply.
Fixes denormal results.
This might have been introduced when I deferred shifting 'k' left.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libm/src/s_exp2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/src/s_exp2.c
diff -u src/lib/libm/src/s_exp2.c:1.4 src/lib/libm/src/s_exp2.c:1.5
--- src/lib/libm/src/s_exp2.c:1.4	Sun Mar 16 22:44:48 2014
+++ src/lib/libm/src/s_exp2.c	Tue Mar 18 21:52:19 2014
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: s_exp2.c,v 1.4 2014/03/16 22:44:48 dsl Exp $");
+__RCSID("$NetBSD: s_exp2.c,v 1.5 2014/03/18 21:52:19 dsl Exp $");
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: src/lib/msun/src/s_exp2.c,v 1.7 2008/02/22 02:27:34 das Exp $");
 #endif
@@ -353,7 +353,8 @@ exp2(double x)
 {
 	volatile ieee_double_shape_type x_p_redux;
 	double r, t, twopk, z;
-	uint32_t hx, ix, lx, i0;
+	uint32_t hx, ix, lx;
+	int32_t i0;
 	int k;
 
 	/* Filter out exceptional cases. */

Reply via email to