Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm/src Change 'i0' to be signed so that the sign bit i...



details:   https://anonhg.NetBSD.org/src/rev/d095d7e9aea9
branches:  trunk
changeset: 327854:d095d7e9aea9
user:      dsl <dsl%NetBSD.org@localhost>
date:      Tue Mar 18 21:52:19 2014 +0000

description:
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.

diffstat:

 lib/libm/src/s_exp2.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 2efff285f1c9 -r d095d7e9aea9 lib/libm/src/s_exp2.c
--- a/lib/libm/src/s_exp2.c     Tue Mar 18 21:36:52 2014 +0000
+++ b/lib/libm/src/s_exp2.c     Tue Mar 18 21:52:19 2014 +0000
@@ -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 @@
 {
        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. */



Home | Main Index | Thread Index | Old Index