CVS commit: [netbsd-6] src/lib/libm/src

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 16:40:30 UTC 2015

Modified Files:
src/lib/libm/src [netbsd-6]: lrint.c lrintf.c

Log Message:
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@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.22.1 src/lib/libm/src/lrint.c
cvs rdiff -u -r1.5 -r1.5.22.1 src/lib/libm/src/lrintf.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/lrint.c
diff -u src/lib/libm/src/lrint.c:1.4 src/lib/libm/src/lrint.c:1.4.22.1
--- src/lib/libm/src/lrint.c:1.4	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrint.c	Sun Nov 15 16:40:30 2015
@@ -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 @@ LRINTNAME(double x)
 		/* 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;

Index: src/lib/libm/src/lrintf.c
diff -u src/lib/libm/src/lrintf.c:1.5 src/lib/libm/src/lrintf.c:1.5.22.1
--- src/lib/libm/src/lrintf.c:1.5	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrintf.c	Sun Nov 15 16:40:30 2015
@@ -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 @@ LRINTNAME(float x)
 		/* 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;



CVS commit: [netbsd-6] src/lib/libm/src

2015-11-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Nov 15 16:40:30 UTC 2015

Modified Files:
src/lib/libm/src [netbsd-6]: lrint.c lrintf.c

Log Message:
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@


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

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