summaryrefslogtreecommitdiffstats
path: root/tools/regression/lib
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-08-02 19:21:33 +0000
committerdas <das@FreeBSD.org>2008-08-02 19:21:33 +0000
commitf97e361aa33ce68aa514d8462c10ad4e1bc2186f (patch)
tree54e7b7f87b407e2faa6fdabcad91316ec43ed561 /tools/regression/lib
parent9df7b1ac5c081557d761b1e0135a16f782e21354 (diff)
downloadFreeBSD-src-f97e361aa33ce68aa514d8462c10ad4e1bc2186f.zip
FreeBSD-src-f97e361aa33ce68aa514d8462c10ad4e1bc2186f.tar.gz
Test that the result is correctly rounded when |y/x| is huge.
Diffstat (limited to 'tools/regression/lib')
-rw-r--r--tools/regression/lib/msun/test-invtrig.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/tools/regression/lib/msun/test-invtrig.c b/tools/regression/lib/msun/test-invtrig.c
index 0eddb97..5900f5b 100644
--- a/tools/regression/lib/msun/test-invtrig.c
+++ b/tools/regression/lib/msun/test-invtrig.c
@@ -362,22 +362,15 @@ test_atan_huge(void)
test2(atan2, -0x1.0p1000, 0x1.0p-1000, (double)-pi / 2, FE_INEXACT);
test2(atan2l, -ldexpl(1.0, LDBL_MAX_EXP - 100),
ldexpl(1.0, 100 - LDBL_MAX_EXP), -pi / 2, FE_INEXACT);
- /*
- * XXX We ought to be able to insist that these are correctly rounded,
- * but that isn't true in practice.
- */
- test2_tol(atan2f, 0x1.0p100, -0x1.0p-100, (float)pi / 2,
- 1, FE_INEXACT);
- test2_tol(atan2, 0x1.0p1000, -0x1.0p-1000, (double)pi / 2,
- 1, FE_INEXACT);
- test2_tol(atan2l, ldexpl(1.0, LDBL_MAX_EXP - 100),
- -ldexpl(1.0, 100 - LDBL_MAX_EXP), pi / 2, 0, FE_INEXACT);
- test2_tol(atan2f, -0x1.0p100, -0x1.0p-100, (float)-pi / 2,
- 1, FE_INEXACT);
- test2_tol(atan2, -0x1.0p1000, -0x1.0p-1000, (double)-pi / 2,
- 1, FE_INEXACT);
- test2_tol(atan2l, -ldexpl(1.0, LDBL_MAX_EXP - 100),
- -ldexpl(1.0, 100 - LDBL_MAX_EXP), -pi / 2, 1, FE_INEXACT);
+
+ test2(atan2f, 0x1.0p100, -0x1.0p-100, (float)pi / 2, FE_INEXACT);
+ test2(atan2, 0x1.0p1000, -0x1.0p-1000, (double)pi / 2, FE_INEXACT);
+ test2(atan2l, ldexpl(1.0, LDBL_MAX_EXP - 100),
+ -ldexpl(1.0, 100 - LDBL_MAX_EXP), pi / 2, FE_INEXACT);
+ test2(atan2f, -0x1.0p100, -0x1.0p-100, (float)-pi / 2, FE_INEXACT);
+ test2(atan2, -0x1.0p1000, -0x1.0p-1000, (double)-pi / 2, FE_INEXACT);
+ test2(atan2l, -ldexpl(1.0, LDBL_MAX_EXP - 100),
+ -ldexpl(1.0, 100 - LDBL_MAX_EXP), -pi / 2, FE_INEXACT);
}
/*
OpenPOWER on IntegriCloud