summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-04-10 16:29:43 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-04-10 16:29:43 +0000
commit949835012a2d33afd59997f5b9be067535cd04e2 (patch)
tree411fa03280d8a1f611722e645cb0263a3c66c46c /regress/lib
parent9f456934bb9a90ca681b33e80b4019703968f08d (diff)
add tests for yet-another bug of netbsd implementation of lrint.
i've added only couple of values, however the whole exponent range of 52 is broken. luckily amd64 and i386 aren't affected, since they use the assembly versions which do the right thing.
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libm/rint/rint.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/lib/libm/rint/rint.c b/regress/lib/libm/rint/rint.c
index 50c11c7e314..755b86fdb5a 100644
--- a/regress/lib/libm/rint/rint.c
+++ b/regress/lib/libm/rint/rint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rint.c,v 1.8 2011/04/10 11:10:09 martynas Exp $ */
+/* $OpenBSD: rint.c,v 1.9 2011/04/10 16:29:42 martynas Exp $ */
/* Written by Michael Shalayeff, 2003, Public domain. */
@@ -47,6 +47,9 @@ main(int argc, char *argv[])
assert(lrint(-0.0) == 0L);
assert(lrintf(-0.0) == 0L);
+ assert(llrint(4503599627370496.0) == 4503599627370496L);
+ assert(llrint(-4503599627370496.0) == -4503599627370496L);
+
fpsetround(FP_RM);
assert(lrint(-0.1) == -1L);
assert(lrintf(-0.1) == -1L);