Source-Changes-HG archive

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

[src/netbsd-6]: src/lib/libm/src Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/6fcd7ba9efb2
branches:  netbsd-6
changeset: 776996:6fcd7ba9efb2
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Nov 15 16:40:30 2015 +0000

description:
Pull up following revision(s) (requested by nat in ticket #1311):
        lib/libm/src/lrintf.c: revision 1.6
        lib/libm/src/lrint.c: revision 1.5
Return x for >= DBL_FRACBITS in lrint.c.
Return x for >= SNG_FRACBITS in lrintf.c
Addresses PR lib/49690
This commit was approved by christos@

diffstat:

 lib/libm/src/lrint.c  |  5 +++--
 lib/libm/src/lrintf.c |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r f16b303eb63a -r 6fcd7ba9efb2 lib/libm/src/lrint.c
--- a/lib/libm/src/lrint.c      Sun Nov 15 16:36:57 2015 +0000
+++ b/lib/libm/src/lrint.c      Sun Nov 15 16:40:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lrint.c,v 1.4 2008/04/26 23:49:50 christos Exp $ */
+/* $NetBSD: lrint.c,v 1.4.22.1 2015/11/15 16:40:30 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -70,7 +70,8 @@
                /* round, using current direction */
                x += TWO52[s];
                x -= TWO52[s];
-       }
+       } else
+               return x;
 
        EXTRACT_WORDS(i0, i1, x);
        e = ((i0 >> 20) & 0x7ff) - DBL_EXP_BIAS;
diff -r f16b303eb63a -r 6fcd7ba9efb2 lib/libm/src/lrintf.c
--- a/lib/libm/src/lrintf.c     Sun Nov 15 16:36:57 2015 +0000
+++ b/lib/libm/src/lrintf.c     Sun Nov 15 16:40:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lrintf.c,v 1.5 2008/04/26 23:49:50 christos Exp $ */
+/* $NetBSD: lrintf.c,v 1.5.22.1 2015/11/15 16:40:30 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -74,7 +74,8 @@
                /* round, using current direction */
                w = TWO23[s] + x;
                x = w - TWO23[s];
-       }
+       } else
+               return x;
 
        GET_FLOAT_WORD(i0, x);
        e = ((i0 >> SNG_FRACBITS) & 0xff) - SNG_EXP_BIAS;



Home | Main Index | Thread Index | Old Index