diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-18 12:33:53 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-18 12:33:53 -0800 |
commit | 05b227bdaea9a5f1faf08dad31221d8736f3659d (patch) | |
tree | 06e947ef8dbcee671b979246fa994fba53081e4c /math | |
parent | 786b0b67a3019e84988a6d5a79fd97801580a1cd (diff) | |
download | glibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.zip glibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.tar.gz glibc-05b227bdaea9a5f1faf08dad31221d8736f3659d.tar.bz2 |
Correct tinyness handling in long-double and float y0/y1.
With help from Joseph Myers.
* sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Adjust tinyness
cutoff to 2**-13.
* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Adjust tinyness
cutoff to 2**-25.
* sysdeps/ieee754/ldbl-128/e_j0l.c (U0): New constant.
( __ieee754_y0l): Avoid arithmetic underflow when 'x' is very
small.
* sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
* math/libm-test.inc (y0_test): New tests.
(y1_test): New tests.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 225a5e1..0b254e1 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -10198,6 +10198,18 @@ y0_test (void) TEST_f_f (y0, 0x1.ff00000000002p+840L, 1.846591691699331493194965158699937660696e-127L, UNDERFLOW_EXCEPTION_OK); #endif + TEST_f_f (y0, 0x1p-10L, -4.4865150767109739412411806297168793661098L); + TEST_f_f (y0, 0x1p-20L, -8.8992283012125827603076426611387876938160L); + TEST_f_f (y0, 0x1p-30L, -1.3311940304267782826037118027401817264906e+1L); + TEST_f_f (y0, 0x1p-40L, -1.7724652307320814696990854700366226762563e+1L); + TEST_f_f (y0, 0x1p-50L, -2.2137364310373846564919987139743760738155e+1L); + TEST_f_f (y0, 0x1p-60L, -2.6550076313426878432849115782108205929120e+1L); + TEST_f_f (y0, 0x1p-70L, -3.0962788316479910300778244424468159753887e+1L); + TEST_f_f (y0, 0x1p-80L, -3.5375500319532942168707373066828113573541e+1L); + TEST_f_f (y0, 0x1p-90L, -3.9788212322585974036636501709188067393195e+1L); + TEST_f_f (y0, 0x1p-100L, -4.420092432563900590456563035154802121284e+1L); + TEST_f_f (y0, 0x1p-110L, -4.861363632869203777249475899390797503250e+1L); + END (y0); } @@ -10241,6 +10253,18 @@ y1_test (void) TEST_f_f (y1, 0x1.001000001p+593L, 3.927269966354206207832593635798954916263e-90L, UNDERFLOW_EXCEPTION_OK); #endif + TEST_f_f (y1, 0x1p-10L, -6.5190099301063115047395187618929589514382e+02L); + TEST_f_f (y1, 0x1p-20L, -6.6754421443450423911167962313100637952285e+05L); + TEST_f_f (y1, 0x1p-30L, -6.8356527557643159612937462812258975438856e+08L); + TEST_f_f (y1, 0x1p-40L, -6.9997084219026594793707805777425993547887e+11L); + TEST_f_f (y1, 0x1p-50L, -7.1677014240283233068755952926181262431559e+14L); + TEST_f_f (y1, 0x1p-60L, -7.3397262582050030662406095795388448059822e+17L); + TEST_f_f (y1, 0x1p-70L, -7.5158796884019231398303842094477769620063e+20L); + TEST_f_f (y1, 0x1p-80L, -7.6962608009235692951863134304745236090943e+23L); + TEST_f_f (y1, 0x1p-90L, -7.8809710601457349582707849528059121757126e+26L); + TEST_f_f (y1, 0x1p-100L, -8.0701143655892325972692837916732540679297e+29L); + TEST_f_f (y1, 0x1p-110L, -8.2637971103633741796037466026734121655600e+32L); + END (y1); } |