This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Add more tests of csqrt [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Thu, 30 Apr 2015 22:52:11 +0000
- Subject: Add more tests of csqrt [committed]
- Authentication-results: sourceware.org; auth=none
This patch adds some randomly-generated tests of csqrt that are
observed to increase ulps on x86_64.
Tested for x86_64 and x86 and ulps updated accordingly. Committed.
(auto-libm-test-out diffs omitted below.)
2015-04-30 Joseph Myers <joseph@codesourcery.com>
* math/auto-libm-test-in: Add more tests of csqrt.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 8403156..9c2abde 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -940,6 +940,20 @@ csqrt -2 3
# Principal square root should be returned (i.e., non-negative real part).
csqrt 0 -1
+csqrt -0xe.6432ap-4 0xe.8175p-4
+csqrt -0x4.d01448p-4 -0x7.c1915p+0
+csqrt -0xd.e1d5fp-4 -0x1.054226p+4
+csqrt 0x5.39e238p+0 -0x4.576278p-4
+csqrt -0xe.735dbp+0 -0x5.26cb98p+40
+csqrt -0x7.915fafbe9f588p-4 -0x2.5e01bcp+0
+csqrt 0xe.229827fe17d08p-4 0xd.849ecp-4
+csqrt -0x4.d0144005d7af4p-4 -0x7.c19148p+0
+csqrt 0x8p-152 0x7.8p-148
+csqrt -0x4.82773b736291p-4 -0x1.bcb7cep+0
+csqrt 0xf.fffffp+124 0xe.7e0c2p+116
+csqrt -0x4.15ca1p+0 -0x8p-152
+csqrt 0xf.a24adp+28 0x8.0f148p+36
+
csqrt 0x1.fffffep+127 0x1.fffffep+127
csqrt 0x1.fffffep+127 1.0
csqrt 0x1p-149 0x1p-149
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index cb93177..7692852 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1104,8 +1104,8 @@ ldouble: 3
Function: Real part of "csqrt":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "csqrt":
ildouble: 1
@@ -1114,46 +1114,46 @@ ldouble: 1
Function: Real part of "csqrt_downward":
double: 1
idouble: 1
-ildouble: 3
-ldouble: 3
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "csqrt_downward":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: Real part of "csqrt_towardzero":
double: 1
idouble: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "csqrt_towardzero":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: Real part of "csqrt_upward":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "csqrt_upward":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: Real part of "ctan":
double: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index e943da1..22dfe5f 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1176,12 +1176,12 @@ ildouble: 3
ldouble: 3
Function: Real part of "csqrt":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "csqrt":
double: 1
@@ -1192,6 +1192,14 @@ ildouble: 1
ldouble: 1
Function: Real part of "csqrt_downward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "csqrt_downward":
double: 3
float: 3
idouble: 3
@@ -1199,45 +1207,37 @@ ifloat: 3
ildouble: 3
ldouble: 3
-Function: Imaginary part of "csqrt_downward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
-
Function: Real part of "csqrt_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "csqrt_towardzero":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "csqrt_upward":
double: 3
-float: 2
+float: 3
idouble: 3
-ifloat: 2
+ifloat: 3
ildouble: 3
ldouble: 3
+Function: Real part of "csqrt_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 4
+ldouble: 4
+
Function: Imaginary part of "csqrt_upward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
Function: Real part of "ctan":
double: 1
--
Joseph S. Myers
joseph@codesourcery.com