Fix csqrt missing underflows (bug 18370).

The csqrt implementations in glibc can miss underflow exceptions when
the real or imaginary part of the result becomes tiny in the course of
scaling down (in particular, multiplication by 0.5) and that scaling
is exact although the relevant part of the mathematical result isn't.
This patch forces the exception in a similar way to previous fixes.

Tested for x86_64 and x86.

	[BZ #18370]
	* math/s_csqrt.c (__csqrt): Force underflow exception for results
	whose real or imaginary part has small absolute value.
	* math/s_csqrtf.c (__csqrtf): Likewise.
	* math/s_csqrtl.c (__csqrtl): Likewise.
	* math/auto-libm-test-in: Add more tests of csqrt.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
This commit is contained in:
Joseph Myers 2015-08-19 22:42:01 +00:00
parent b75d1cfce6
commit 948e12a238
8 changed files with 411 additions and 2 deletions

View File

@ -1,3 +1,14 @@
2015-08-19 Joseph Myers <joseph@codesourcery.com>
[BZ #18370]
* math/s_csqrt.c (__csqrt): Force underflow exception for results
whose real or imaginary part has small absolute value.
* math/s_csqrtf.c (__csqrtf): Likewise.
* math/s_csqrtl.c (__csqrtl): Likewise.
* math/auto-libm-test-in: Add more tests of csqrt.
* math/auto-libm-test-out: Regenerated.
* sysdeps/i386/fpu/libm-test-ulps: Update.
2015-08-19 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
* sysdeps/powerpc/sys/platform/ppc.h (__ppc_set_ppr_med_high,

4
NEWS
View File

@ -10,8 +10,8 @@ Version 2.23
* The following bugs are resolved with this release:
14341, 16517, 16519, 16520, 16734, 16973, 17905, 18084, 18086, 18265,
18421, 18480, 18525, 18618, 18647, 18661, 18681, 18674, 18778, 18781,
18787, 18789, 18790, 18795, 18796, 18820, 18823, 18824.
18370, 18421, 18480, 18525, 18618, 18647, 18661, 18681, 18674, 18778,
18781, 18787, 18789, 18790, 18795, 18796, 18820, 18823, 18824.
* The obsolete header <regexp.h> has been removed. Programs that require
this header must be updated to use <regex.h> instead.

View File

@ -1171,6 +1171,11 @@ csqrt 0x1p-16445 0x1.0000000000000004p-16382
csqrt 0x1p-16494 0x1.0000000000000000000000000001p-16382
csqrt 0x1p-16494 0x1.0000000000000000000000000002p-16382
csqrt 1 min
csqrt 1 -min
csqrt -1 min
csqrt -1 -min
ctan 0 0
ctan 0 -0
ctan -0 0

View File

@ -105924,6 +105924,362 @@ csqrt 0x1p-16494 0x1.0000000000000000000000000002p-16382
= csqrt tonearest ldbl-128 0x4p-16496L 0x4.0000000000000000000000000008p-16384L : 0x1.6a09e667f3bcc908b2fb1366ea98p-8192L 0x1.6a09e667f3bcc908b2fb1366ea96p-8192L : inexact-ok
= csqrt towardzero ldbl-128 0x4p-16496L 0x4.0000000000000000000000000008p-16384L : 0x1.6a09e667f3bcc908b2fb1366ea97p-8192L 0x1.6a09e667f3bcc908b2fb1366ea96p-8192L : inexact-ok
= csqrt upward ldbl-128 0x4p-16496L 0x4.0000000000000000000000000008p-16384L : 0x1.6a09e667f3bcc908b2fb1366ea98p-8192L 0x1.6a09e667f3bcc908b2fb1366ea97p-8192L : inexact-ok
csqrt 1 min
= csqrt downward flt-32 0x1p+0f 0x4p-128f : 0x1p+0f 0x1.fffff8p-128f : inexact-ok underflow errno-erange-ok
= csqrt tonearest flt-32 0x1p+0f 0x4p-128f : 0x1p+0f 0x2p-128f : inexact-ok underflow errno-erange-ok
= csqrt towardzero flt-32 0x1p+0f 0x4p-128f : 0x1p+0f 0x1.fffff8p-128f : inexact-ok underflow errno-erange-ok
= csqrt upward flt-32 0x1p+0f 0x4p-128f : 0x1.000002p+0f 0x2p-128f : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 0x1p+0 0x4p-128 : 0x1p+0 0x1.fffffffffffffp-128 : inexact-ok
= csqrt tonearest dbl-64 0x1p+0 0x4p-128 : 0x1p+0 0x2p-128 : inexact-ok
= csqrt towardzero dbl-64 0x1p+0 0x4p-128 : 0x1p+0 0x1.fffffffffffffp-128 : inexact-ok
= csqrt upward dbl-64 0x1p+0 0x4p-128 : 0x1.0000000000001p+0 0x2p-128 : inexact-ok
= csqrt downward ldbl-96-intel 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.fffffffffffffffep-128L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L 0x4p-128L : 0x1p+0L 0x2p-128L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.fffffffffffffffep-128L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L 0x4p-128L : 0x1.0000000000000002p+0L 0x2p-128L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.fffffffffffffffep-128L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L 0x4p-128L : 0x1p+0L 0x2p-128L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.fffffffffffffffep-128L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L 0x4p-128L : 0x1.0000000000000002p+0L 0x2p-128L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.ffffffffffffffffffffffffffffp-128L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L 0x4p-128L : 0x1p+0L 0x2p-128L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.ffffffffffffffffffffffffffffp-128L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L 0x4p-128L : 0x1.0000000000000000000000000001p+0L 0x2p-128L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.ffffffffffffffffffffffffff8p-128L : inexact-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L 0x4p-128L : 0x1p+0L 0x2p-128L : inexact-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L 0x4p-128L : 0x1p+0L 0x1.ffffffffffffffffffffffffff8p-128L : inexact-ok
= csqrt upward ldbl-128ibm 0x1p+0L 0x4p-128L : 0x1.000000000000000000000000008p+0L 0x2p-128L : inexact-ok
= csqrt downward dbl-64 0x1p+0 0x4p-1024 : 0x1p+0 0x1.ffffffffffffcp-1024 : inexact-ok underflow errno-erange-ok
= csqrt tonearest dbl-64 0x1p+0 0x4p-1024 : 0x1p+0 0x2p-1024 : inexact-ok underflow errno-erange-ok
= csqrt towardzero dbl-64 0x1p+0 0x4p-1024 : 0x1p+0 0x1.ffffffffffffcp-1024 : inexact-ok underflow errno-erange-ok
= csqrt upward dbl-64 0x1p+0 0x4p-1024 : 0x1.0000000000001p+0 0x2p-1024 : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L 0x4p-1024L : 0x1p+0L 0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L 0x4p-1024L : 0x1.0000000000000002p+0L 0x2p-1024L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L 0x4p-1024L : 0x1p+0L 0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L 0x4p-1024L : 0x1.0000000000000002p+0L 0x2p-1024L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.ffffffffffffffffffffffffffffp-1024L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L 0x4p-1024L : 0x1p+0L 0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.ffffffffffffffffffffffffffffp-1024L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L 0x4p-1024L : 0x1.0000000000000000000000000001p+0L 0x2p-1024L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.ffffffffffffcp-1024L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L 0x4p-1024L : 0x1p+0L 0x2p-1024L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L 0x4p-1024L : 0x1p+0L 0x1.ffffffffffffcp-1024L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm 0x1p+0L 0x4p-1024L : 0x1.000000000000000000000000008p+0L 0x2p-1024L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffff8p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L 0x4p-16384L : 0x1p+0L 0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffff8p-16384L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel 0x1p+0L 0x4p-16384L : 0x1.0000000000000002p+0L 0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffffcp-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L 0x4p-16384L : 0x1p+0L 0x2p-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffffcp-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt upward ldbl-96-m68k 0x1p+0L 0x4p-16384L : 0x1.0000000000000002p+0L 0x2p-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt downward ldbl-128 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffffffffffffffffcp-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 0x1p+0L 0x4p-16384L : 0x1p+0L 0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 0x1p+0L 0x4p-16384L : 0x1p+0L 0x1.fffffffffffffffffffffffffffcp-16384L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 0x1p+0L 0x4p-16384L : 0x1.0000000000000000000000000001p+0L 0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffff8p-16388L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L 0x2p-16384L : 0x1p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffff8p-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel 0x1p+0L 0x2p-16384L : 0x1.0000000000000002p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L 0x2p-16384L : 0x1p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-m68k 0x1p+0L 0x2p-16384L : 0x1.0000000000000002p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-128 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 0x1p+0L 0x2p-16384L : 0x1p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 0x1p+0L 0x2p-16384L : 0x1p+0L 0xf.ffffffffffffffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 0x1p+0L 0x2p-16384L : 0x1.0000000000000000000000000001p+0L 0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 0x1p+0 0x8p-972 : 0x1p+0 0x3.ffffffffffffep-972 : inexact-ok
= csqrt tonearest dbl-64 0x1p+0 0x8p-972 : 0x1p+0 0x4p-972 : inexact-ok
= csqrt towardzero dbl-64 0x1p+0 0x8p-972 : 0x1p+0 0x3.ffffffffffffep-972 : inexact-ok
= csqrt upward dbl-64 0x1p+0 0x8p-972 : 0x1.0000000000001p+0 0x4p-972 : inexact-ok
= csqrt downward ldbl-96-intel 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L 0x8p-972L : 0x1p+0L 0x4p-972L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L 0x8p-972L : 0x1.0000000000000002p+0L 0x4p-972L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L 0x8p-972L : 0x1p+0L 0x4p-972L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L 0x8p-972L : 0x1.0000000000000002p+0L 0x4p-972L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffffffffffffffep-972L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L 0x8p-972L : 0x1p+0L 0x4p-972L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffffffffffffffep-972L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L 0x8p-972L : 0x1.0000000000000000000000000001p+0L 0x4p-972L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffffffffffffcp-972L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L 0x8p-972L : 0x1p+0L 0x4p-972L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L 0x8p-972L : 0x1p+0L 0x3.fffffffffffffffffffffffffcp-972L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm 0x1p+0L 0x8p-972L : 0x1.000000000000000000000000008p+0L 0x4p-972L : inexact-ok underflow errno-erange-ok
csqrt 1 -min
= csqrt downward flt-32 0x1p+0f -0x4p-128f : 0x1p+0f -0x2p-128f : inexact-ok underflow errno-erange-ok
= csqrt tonearest flt-32 0x1p+0f -0x4p-128f : 0x1p+0f -0x2p-128f : inexact-ok underflow errno-erange-ok
= csqrt towardzero flt-32 0x1p+0f -0x4p-128f : 0x1p+0f -0x1.fffff8p-128f : inexact-ok underflow errno-erange-ok
= csqrt upward flt-32 0x1p+0f -0x4p-128f : 0x1.000002p+0f -0x1.fffff8p-128f : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 0x1p+0 -0x4p-128 : 0x1p+0 -0x2p-128 : inexact-ok
= csqrt tonearest dbl-64 0x1p+0 -0x4p-128 : 0x1p+0 -0x2p-128 : inexact-ok
= csqrt towardzero dbl-64 0x1p+0 -0x4p-128 : 0x1p+0 -0x1.fffffffffffffp-128 : inexact-ok
= csqrt upward dbl-64 0x1p+0 -0x4p-128 : 0x1.0000000000001p+0 -0x1.fffffffffffffp-128 : inexact-ok
= csqrt downward ldbl-96-intel 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L -0x4p-128L : 0x1p+0L -0x1.fffffffffffffffep-128L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L -0x4p-128L : 0x1.0000000000000002p+0L -0x1.fffffffffffffffep-128L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L -0x4p-128L : 0x1p+0L -0x1.fffffffffffffffep-128L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L -0x4p-128L : 0x1.0000000000000002p+0L -0x1.fffffffffffffffep-128L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L -0x4p-128L : 0x1p+0L -0x1.ffffffffffffffffffffffffffffp-128L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L -0x4p-128L : 0x1.0000000000000000000000000001p+0L -0x1.ffffffffffffffffffffffffffffp-128L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L -0x4p-128L : 0x1p+0L -0x2p-128L : inexact-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L -0x4p-128L : 0x1p+0L -0x1.ffffffffffffffffffffffffff8p-128L : inexact-ok
= csqrt upward ldbl-128ibm 0x1p+0L -0x4p-128L : 0x1.000000000000000000000000008p+0L -0x1.ffffffffffffffffffffffffff8p-128L : inexact-ok
= csqrt downward dbl-64 0x1p+0 -0x4p-1024 : 0x1p+0 -0x2p-1024 : inexact-ok underflow errno-erange-ok
= csqrt tonearest dbl-64 0x1p+0 -0x4p-1024 : 0x1p+0 -0x2p-1024 : inexact-ok underflow errno-erange-ok
= csqrt towardzero dbl-64 0x1p+0 -0x4p-1024 : 0x1p+0 -0x1.ffffffffffffcp-1024 : inexact-ok underflow errno-erange-ok
= csqrt upward dbl-64 0x1p+0 -0x4p-1024 : 0x1.0000000000001p+0 -0x1.ffffffffffffcp-1024 : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L -0x4p-1024L : 0x1p+0L -0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L -0x4p-1024L : 0x1.0000000000000002p+0L -0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L -0x4p-1024L : 0x1p+0L -0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L -0x4p-1024L : 0x1.0000000000000002p+0L -0x1.fffffffffffffffep-1024L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L -0x4p-1024L : 0x1p+0L -0x1.ffffffffffffffffffffffffffffp-1024L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L -0x4p-1024L : 0x1.0000000000000000000000000001p+0L -0x1.ffffffffffffffffffffffffffffp-1024L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L -0x4p-1024L : 0x1p+0L -0x2p-1024L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L -0x4p-1024L : 0x1p+0L -0x1.ffffffffffffcp-1024L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm 0x1p+0L -0x4p-1024L : 0x1.000000000000000000000000008p+0L -0x1.ffffffffffffcp-1024L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L -0x4p-16384L : 0x1p+0L -0x1.fffffffffffffff8p-16384L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel 0x1p+0L -0x4p-16384L : 0x1.0000000000000002p+0L -0x1.fffffffffffffff8p-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L -0x4p-16384L : 0x1p+0L -0x1.fffffffffffffffcp-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt upward ldbl-96-m68k 0x1p+0L -0x4p-16384L : 0x1.0000000000000002p+0L -0x1.fffffffffffffffcp-16384L : inexact-ok underflow-ok errno-erange-ok
= csqrt downward ldbl-128 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 0x1p+0L -0x4p-16384L : 0x1p+0L -0x2p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 0x1p+0L -0x4p-16384L : 0x1p+0L -0x1.fffffffffffffffffffffffffffcp-16384L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 0x1p+0L -0x4p-16384L : 0x1.0000000000000000000000000001p+0L -0x1.fffffffffffffffffffffffffffcp-16384L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L -0x2p-16384L : 0x1p+0L -0xf.ffffffffffffff8p-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel 0x1p+0L -0x2p-16384L : 0x1.0000000000000002p+0L -0xf.ffffffffffffff8p-16388L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L -0x2p-16384L : 0x1p+0L -0xf.ffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-m68k 0x1p+0L -0x2p-16384L : 0x1.0000000000000002p+0L -0xf.ffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-128 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 0x1p+0L -0x2p-16384L : 0x1p+0L -0x1p-16384L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 0x1p+0L -0x2p-16384L : 0x1p+0L -0xf.ffffffffffffffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 0x1p+0L -0x2p-16384L : 0x1.0000000000000000000000000001p+0L -0xf.ffffffffffffffffffffffffffcp-16388L : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 0x1p+0 -0x8p-972 : 0x1p+0 -0x4p-972 : inexact-ok
= csqrt tonearest dbl-64 0x1p+0 -0x8p-972 : 0x1p+0 -0x4p-972 : inexact-ok
= csqrt towardzero dbl-64 0x1p+0 -0x8p-972 : 0x1p+0 -0x3.ffffffffffffep-972 : inexact-ok
= csqrt upward dbl-64 0x1p+0 -0x8p-972 : 0x1.0000000000001p+0 -0x3.ffffffffffffep-972 : inexact-ok
= csqrt downward ldbl-96-intel 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt tonearest ldbl-96-intel 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt towardzero ldbl-96-intel 0x1p+0L -0x8p-972L : 0x1p+0L -0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt upward ldbl-96-intel 0x1p+0L -0x8p-972L : 0x1.0000000000000002p+0L -0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt downward ldbl-96-m68k 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt tonearest ldbl-96-m68k 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt towardzero ldbl-96-m68k 0x1p+0L -0x8p-972L : 0x1p+0L -0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt upward ldbl-96-m68k 0x1p+0L -0x8p-972L : 0x1.0000000000000002p+0L -0x3.fffffffffffffffcp-972L : inexact-ok
= csqrt downward ldbl-128 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt tonearest ldbl-128 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok
= csqrt towardzero ldbl-128 0x1p+0L -0x8p-972L : 0x1p+0L -0x3.fffffffffffffffffffffffffffep-972L : inexact-ok
= csqrt upward ldbl-128 0x1p+0L -0x8p-972L : 0x1.0000000000000000000000000001p+0L -0x3.fffffffffffffffffffffffffffep-972L : inexact-ok
= csqrt downward ldbl-128ibm 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm 0x1p+0L -0x8p-972L : 0x1p+0L -0x4p-972L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm 0x1p+0L -0x8p-972L : 0x1p+0L -0x3.fffffffffffffffffffffffffcp-972L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm 0x1p+0L -0x8p-972L : 0x1.000000000000000000000000008p+0L -0x3.fffffffffffffffffffffffffcp-972L : inexact-ok underflow errno-erange-ok
csqrt -1 min
= csqrt downward flt-32 -0x1p+0f 0x4p-128f : 0x1.fffff8p-128f 0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt tonearest flt-32 -0x1p+0f 0x4p-128f : 0x2p-128f 0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt towardzero flt-32 -0x1p+0f 0x4p-128f : 0x1.fffff8p-128f 0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt upward flt-32 -0x1p+0f 0x4p-128f : 0x2p-128f 0x1.000002p+0f : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 -0x1p+0 0x4p-128 : 0x1.fffffffffffffp-128 0x1p+0 : inexact-ok
= csqrt tonearest dbl-64 -0x1p+0 0x4p-128 : 0x2p-128 0x1p+0 : inexact-ok
= csqrt towardzero dbl-64 -0x1p+0 0x4p-128 : 0x1.fffffffffffffp-128 0x1p+0 : inexact-ok
= csqrt upward dbl-64 -0x1p+0 0x4p-128 : 0x2p-128 0x1.0000000000001p+0 : inexact-ok
= csqrt downward ldbl-96-intel -0x1p+0L 0x4p-128L : 0x1.fffffffffffffffep-128L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L 0x4p-128L : 0x2p-128L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L 0x4p-128L : 0x1.fffffffffffffffep-128L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L 0x4p-128L : 0x2p-128L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L 0x4p-128L : 0x1.fffffffffffffffep-128L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L 0x4p-128L : 0x2p-128L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L 0x4p-128L : 0x1.fffffffffffffffep-128L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L 0x4p-128L : 0x2p-128L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L 0x4p-128L : 0x1.ffffffffffffffffffffffffffffp-128L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L 0x4p-128L : 0x2p-128L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L 0x4p-128L : 0x1.ffffffffffffffffffffffffffffp-128L 0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L 0x4p-128L : 0x2p-128L 0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L 0x4p-128L : 0x1.ffffffffffffffffffffffffff8p-128L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L 0x4p-128L : 0x2p-128L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L 0x4p-128L : 0x1.ffffffffffffffffffffffffff8p-128L 0x1p+0L : inexact-ok
= csqrt upward ldbl-128ibm -0x1p+0L 0x4p-128L : 0x2p-128L 0x1.000000000000000000000000008p+0L : inexact-ok
= csqrt downward dbl-64 -0x1p+0 0x4p-1024 : 0x1.ffffffffffffcp-1024 0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt tonearest dbl-64 -0x1p+0 0x4p-1024 : 0x2p-1024 0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt towardzero dbl-64 -0x1p+0 0x4p-1024 : 0x1.ffffffffffffcp-1024 0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt upward dbl-64 -0x1p+0 0x4p-1024 : 0x2p-1024 0x1.0000000000001p+0 : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L 0x4p-1024L : 0x1.fffffffffffffffep-1024L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L 0x4p-1024L : 0x1.fffffffffffffffep-1024L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L 0x4p-1024L : 0x1.fffffffffffffffep-1024L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L 0x4p-1024L : 0x1.fffffffffffffffep-1024L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L 0x4p-1024L : 0x1.ffffffffffffffffffffffffffffp-1024L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L 0x4p-1024L : 0x1.ffffffffffffffffffffffffffffp-1024L 0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L 0x4p-1024L : 0x1.ffffffffffffcp-1024L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L 0x4p-1024L : 0x1.ffffffffffffcp-1024L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm -0x1p+0L 0x4p-1024L : 0x2p-1024L 0x1.000000000000000000000000008p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffff8p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffff8p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffffcp-16384L 0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffffcp-16384L 0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt upward ldbl-96-m68k -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1.0000000000000002p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt downward ldbl-128 -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffffffffffffffffcp-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 -0x1p+0L 0x4p-16384L : 0x1.fffffffffffffffffffffffffffcp-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 -0x1p+0L 0x4p-16384L : 0x2p-16384L 0x1.0000000000000000000000000001p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffff8p-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffff8p-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffffcp-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffffcp-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-m68k -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-128 -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffffffffffffffffcp-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 -0x1p+0L 0x2p-16384L : 0xf.ffffffffffffffffffffffffffcp-16388L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 -0x1p+0L 0x2p-16384L : 0x1p-16384L 0x1.0000000000000000000000000001p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 -0x1p+0 0x8p-972 : 0x3.ffffffffffffep-972 0x1p+0 : inexact-ok
= csqrt tonearest dbl-64 -0x1p+0 0x8p-972 : 0x4p-972 0x1p+0 : inexact-ok
= csqrt towardzero dbl-64 -0x1p+0 0x8p-972 : 0x3.ffffffffffffep-972 0x1p+0 : inexact-ok
= csqrt upward dbl-64 -0x1p+0 0x8p-972 : 0x4p-972 0x1.0000000000001p+0 : inexact-ok
= csqrt downward ldbl-96-intel -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffcp-972L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L 0x8p-972L : 0x4p-972L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffcp-972L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L 0x8p-972L : 0x4p-972L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffcp-972L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L 0x8p-972L : 0x4p-972L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffcp-972L 0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L 0x8p-972L : 0x4p-972L 0x1.0000000000000002p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffffffffffffffep-972L 0x1p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L 0x8p-972L : 0x4p-972L 0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffffffffffffffep-972L 0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L 0x8p-972L : 0x4p-972L 0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffffffffffffcp-972L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L 0x8p-972L : 0x4p-972L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L 0x8p-972L : 0x3.fffffffffffffffffffffffffcp-972L 0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm -0x1p+0L 0x8p-972L : 0x4p-972L 0x1.000000000000000000000000008p+0L : inexact-ok underflow errno-erange-ok
csqrt -1 -min
= csqrt downward flt-32 -0x1p+0f -0x4p-128f : 0x1.fffff8p-128f -0x1.000002p+0f : inexact-ok underflow errno-erange-ok
= csqrt tonearest flt-32 -0x1p+0f -0x4p-128f : 0x2p-128f -0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt towardzero flt-32 -0x1p+0f -0x4p-128f : 0x1.fffff8p-128f -0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt upward flt-32 -0x1p+0f -0x4p-128f : 0x2p-128f -0x1p+0f : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 -0x1p+0 -0x4p-128 : 0x1.fffffffffffffp-128 -0x1.0000000000001p+0 : inexact-ok
= csqrt tonearest dbl-64 -0x1p+0 -0x4p-128 : 0x2p-128 -0x1p+0 : inexact-ok
= csqrt towardzero dbl-64 -0x1p+0 -0x4p-128 : 0x1.fffffffffffffp-128 -0x1p+0 : inexact-ok
= csqrt upward dbl-64 -0x1p+0 -0x4p-128 : 0x2p-128 -0x1p+0 : inexact-ok
= csqrt downward ldbl-96-intel -0x1p+0L -0x4p-128L : 0x1.fffffffffffffffep-128L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L -0x4p-128L : 0x1.fffffffffffffffep-128L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L -0x4p-128L : 0x1.fffffffffffffffep-128L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L -0x4p-128L : 0x1.fffffffffffffffep-128L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L -0x4p-128L : 0x1.ffffffffffffffffffffffffffffp-128L -0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L -0x4p-128L : 0x1.ffffffffffffffffffffffffffffp-128L -0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L -0x4p-128L : 0x1.ffffffffffffffffffffffffff8p-128L -0x1.000000000000000000000000008p+0L : inexact-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L -0x4p-128L : 0x1.ffffffffffffffffffffffffff8p-128L -0x1p+0L : inexact-ok
= csqrt upward ldbl-128ibm -0x1p+0L -0x4p-128L : 0x2p-128L -0x1p+0L : inexact-ok
= csqrt downward dbl-64 -0x1p+0 -0x4p-1024 : 0x1.ffffffffffffcp-1024 -0x1.0000000000001p+0 : inexact-ok underflow errno-erange-ok
= csqrt tonearest dbl-64 -0x1p+0 -0x4p-1024 : 0x2p-1024 -0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt towardzero dbl-64 -0x1p+0 -0x4p-1024 : 0x1.ffffffffffffcp-1024 -0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt upward dbl-64 -0x1p+0 -0x4p-1024 : 0x2p-1024 -0x1p+0 : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L -0x4p-1024L : 0x1.fffffffffffffffep-1024L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L -0x4p-1024L : 0x1.fffffffffffffffep-1024L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L -0x4p-1024L : 0x1.fffffffffffffffep-1024L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L -0x4p-1024L : 0x1.fffffffffffffffep-1024L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L -0x4p-1024L : 0x1.ffffffffffffffffffffffffffffp-1024L -0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L -0x4p-1024L : 0x1.ffffffffffffffffffffffffffffp-1024L -0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L -0x4p-1024L : 0x1.ffffffffffffcp-1024L -0x1.000000000000000000000000008p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L -0x4p-1024L : 0x1.ffffffffffffcp-1024L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm -0x1p+0L -0x4p-1024L : 0x2p-1024L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffff8p-16384L -0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffff8p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffffcp-16384L -0x1.0000000000000002p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffffcp-16384L -0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt upward ldbl-96-m68k -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow-ok errno-erange-ok
= csqrt downward ldbl-128 -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffffffffffffffffcp-16384L -0x1.0000000000000000000000000001p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 -0x1p+0L -0x4p-16384L : 0x1.fffffffffffffffffffffffffffcp-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 -0x1p+0L -0x4p-16384L : 0x2p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-intel -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffff8p-16388L -0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffff8p-16388L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-intel -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-96-m68k -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffffcp-16388L -0x1.0000000000000002p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffffcp-16388L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-96-m68k -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward ldbl-128 -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffffffffffffffffcp-16388L -0x1.0000000000000000000000000001p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128 -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128 -0x1p+0L -0x2p-16384L : 0xf.ffffffffffffffffffffffffffcp-16388L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128 -0x1p+0L -0x2p-16384L : 0x1p-16384L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt downward dbl-64 -0x1p+0 -0x8p-972 : 0x3.ffffffffffffep-972 -0x1.0000000000001p+0 : inexact-ok
= csqrt tonearest dbl-64 -0x1p+0 -0x8p-972 : 0x4p-972 -0x1p+0 : inexact-ok
= csqrt towardzero dbl-64 -0x1p+0 -0x8p-972 : 0x3.ffffffffffffep-972 -0x1p+0 : inexact-ok
= csqrt upward dbl-64 -0x1p+0 -0x8p-972 : 0x4p-972 -0x1p+0 : inexact-ok
= csqrt downward ldbl-96-intel -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffcp-972L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-intel -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-intel -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffcp-972L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-intel -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt downward ldbl-96-m68k -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffcp-972L -0x1.0000000000000002p+0L : inexact-ok
= csqrt tonearest ldbl-96-m68k -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-96-m68k -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffcp-972L -0x1p+0L : inexact-ok
= csqrt upward ldbl-96-m68k -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128 -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffffffffffffffep-972L -0x1.0000000000000000000000000001p+0L : inexact-ok
= csqrt tonearest ldbl-128 -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt towardzero ldbl-128 -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffffffffffffffep-972L -0x1p+0L : inexact-ok
= csqrt upward ldbl-128 -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok
= csqrt downward ldbl-128ibm -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffffffffffffcp-972L -0x1.000000000000000000000000008p+0L : inexact-ok underflow errno-erange-ok
= csqrt tonearest ldbl-128ibm -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt towardzero ldbl-128ibm -0x1p+0L -0x8p-972L : 0x3.fffffffffffffffffffffffffcp-972L -0x1p+0L : inexact-ok underflow errno-erange-ok
= csqrt upward ldbl-128ibm -0x1p+0L -0x8p-972L : 0x4p-972L -0x1p+0L : inexact-ok underflow errno-erange-ok
ctan 0 0
= ctan downward flt-32 0x0p+0f 0x0p+0f : 0x0p+0f 0x0p+0f : inexact-ok
= ctan tonearest flt-32 0x0p+0f 0x0p+0f : 0x0p+0f 0x0p+0f : inexact-ok

View File

@ -148,6 +148,17 @@ __csqrt (__complex__ double x)
s = __scalbn (s, scale);
}
if (fabs (r) < DBL_MIN)
{
double force_underflow = r * r;
math_force_eval (force_underflow);
}
if (fabs (s) < DBL_MIN)
{
double force_underflow = s * s;
math_force_eval (force_underflow);
}
__real__ res = r;
__imag__ res = __copysign (s, __imag__ x);
}

View File

@ -148,6 +148,17 @@ __csqrtf (__complex__ float x)
s = __scalbnf (s, scale);
}
if (fabsf (r) < FLT_MIN)
{
float force_underflow = r * r;
math_force_eval (force_underflow);
}
if (fabsf (s) < FLT_MIN)
{
float force_underflow = s * s;
math_force_eval (force_underflow);
}
__real__ res = r;
__imag__ res = __copysignf (s, __imag__ x);
}

View File

@ -148,6 +148,17 @@ __csqrtl (__complex__ long double x)
s = __scalbnl (s, scale);
}
if (fabsl (r) < LDBL_MIN)
{
long double force_underflow = r * r;
math_force_eval (force_underflow);
}
if (fabsl (s) < LDBL_MIN)
{
long double force_underflow = s * s;
math_force_eval (force_underflow);
}
__real__ res = r;
__imag__ res = __copysignl (s, __imag__ x);
}

View File

@ -1213,7 +1213,9 @@ ldouble: 2
Function: Real part of "csqrt_downward":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 4
ldouble: 4
@ -1227,7 +1229,9 @@ ldouble: 4
Function: Real part of "csqrt_towardzero":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 4
ldouble: 4