diff options
-rw-r--r-- | ChangeLog | 30 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | math/auto-libm-test-in | 9 | ||||
-rw-r--r-- | math/auto-libm-test-out | 200 | ||||
-rw-r--r-- | sysdeps/i386/fpu/e_asin.S | 34 | ||||
-rw-r--r-- | sysdeps/i386/fpu/e_asinf.S | 34 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_asin.c | 12 | ||||
-rw-r--r-- | sysdeps/ieee754/flt-32/e_asinf.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128/e_asinl.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_asinl.c | 6 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-96/e_asinl.c | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/multiarch/e_asin.c | 1 |
12 files changed, 240 insertions, 112 deletions
diff --git a/ChangeLog b/ChangeLog index ac6110b965..1cc3de62de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,35 @@ 2015-02-26 Joseph Myers <joseph@codesourcery.com> + [BZ #16351] + * sysdeps/i386/fpu/e_asin.S (dbl_min): New object. + (MO): New macro. + (__ieee754_asin): Force underflow exception for results with small + absolute value. + * sysdeps/i386/fpu/e_asinf.S (flt_min): New object. + (MO): New macro. + (__ieee754_asinf): Force underflow exception for results with + small absolute value. + * sysdeps/ieee754/dbl-64/e_asin.c: Include <float.h> and <math.h>. + (__ieee754_asin): Force underflow exception for results with small + absolute value. + * sysdeps/ieee754/flt-32/e_asinf.c: Include <float.h>. + (__ieee754_asinf): Force underflow exception for results with + small absolute value. + * sysdeps/ieee754/ldbl-128/e_asinl.c: Include <float.h>. + (__ieee754_asinl): Force underflow exception for results with + small absolute value. + * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Include <float.h>. + (__ieee754_asinl): Force underflow exception for results with + small absolute value. + * sysdeps/ieee754/ldbl-96/e_asinl.c: Include <float.h>. + (__ieee754_asinl): Force underflow exception for results with + small absolute value. + * sysdeps/x86_64/fpu/multiarch/e_asin.c [HAVE_FMA4_SUPPORT]: + Include <math.h>. + * math/auto-libm-test-in: Do not mark underflow exceptions as + possibly missing for bug 16351. + * math/auto-libm-test-out: Regenerated. + [BZ #18030] * sysdeps/ieee754/ldbl-128ibm/s_logbl.c (__logbl): Adjust exponent of power of 2 down when low part has opposite sign. diff --git a/NEWS b/NEWS index f09ffb1ccd..40959d3530 100644 --- a/NEWS +++ b/NEWS @@ -9,10 +9,10 @@ Version 2.22 * The following bugs are resolved with this release: - 4719, 14841, 13064, 14094, 15319, 15467, 15790, 15969, 16560, 16783, - 17269, 17523, 17569, 17588, 17792, 17836, 17912, 17916, 17932, 17944, - 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991, 17996, 17998, - 17999, 18019, 18020, 18029, 18030, 18032. + 4719, 14841, 13064, 14094, 15319, 15467, 15790, 15969, 16351, 16560, + 16783, 17269, 17523, 17569, 17588, 17792, 17836, 17912, 17916, 17932, + 17944, 17949, 17964, 17965, 17967, 17969, 17978, 17987, 17991, 17996, + 17998, 17999, 18019, 18020, 18029, 18030, 18032. * Character encoding and ctype tables were updated to Unicode 7.0.0, using new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index df51c26ff9..bd85805224 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -91,11 +91,10 @@ asin 0x0.ffffffffffffp0 asin -0x0.ffffffffffffp0 asin 0x0.ffffffffffffffffp0 asin -0x0.ffffffffffffffffp0 -# Bug 16351: underflow exception may be missing. -asin min missing-underflow -asin -min missing-underflow -asin min_subnorm missing-underflow -asin -min_subnorm missing-underflow +asin min +asin -min +asin min_subnorm +asin -min_subnorm asinh 0 asinh -0 diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out index 83170d9efc..67804a5c71 100644 --- a/math/auto-libm-test-out +++ b/math/auto-libm-test-out @@ -2855,7 +2855,7 @@ asin -0x0.ffffffffffffffffp0 = asin tonearest ldbl-128ibm -0xf.fffffffffffffffp-4L : -0x1.921fb542d8c79e0195cffc0e308p+0L : inexact-ok = asin towardzero ldbl-128ibm -0xf.fffffffffffffffp-4L : -0x1.921fb542d8c79e0195cffc0e308p+0L : inexact-ok = asin upward ldbl-128ibm -0xf.fffffffffffffffp-4L : -0x1.921fb542d8c79e0195cffc0e308p+0L : inexact-ok -asin min missing-underflow +asin min = asin downward flt-32 0x4p-128f : 0x4p-128f : inexact-ok underflow-ok errno-erange-ok = asin tonearest flt-32 0x4p-128f : 0x4p-128f : inexact-ok underflow-ok errno-erange-ok = asin towardzero flt-32 0x4p-128f : 0x4p-128f : inexact-ok underflow-ok errno-erange-ok @@ -2896,10 +2896,10 @@ asin min missing-underflow = asin tonearest ldbl-128 0x4p-1024L : 0x4p-1024L : inexact-ok = asin towardzero ldbl-128 0x4p-1024L : 0x4p-1024L : inexact-ok = asin upward ldbl-128 0x4p-1024L : 0x4.0000000000000000000000000004p-1024L : inexact-ok -= asin downward ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128ibm 0x4p-1024L : 0x4.0000000000004p-1024L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128ibm 0x4p-1024L : 0x4p-1024L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128ibm 0x4p-1024L : 0x4.0000000000004p-1024L : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-intel 0x4p-16384L : 0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin tonearest ldbl-96-intel 0x4p-16384L : 0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-96-intel 0x4p-16384L : 0x4p-16384L : inexact-ok underflow-ok errno-erange-ok @@ -2912,18 +2912,18 @@ asin min missing-underflow = asin tonearest ldbl-128 0x4p-16384L : 0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-128 0x4p-16384L : 0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-128 0x4p-16384L : 0x4.0000000000000000000000000004p-16384L : inexact-ok underflow-ok errno-erange-ok -= asin downward ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-intel 0x2p-16384L : 0x2.0000000000000008p-16384L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-intel 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-intel 0x2p-16384L : 0x2.0000000000000008p-16384L : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-m68k 0x2p-16384L : 0x2p-16384L : inexact-ok underflow-ok errno-erange-ok = asin tonearest ldbl-96-m68k 0x2p-16384L : 0x2p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-96-m68k 0x2p-16384L : 0x2p-16384L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-96-m68k 0x2p-16384L : 0x2.0000000000000004p-16384L : inexact-ok underflow-ok errno-erange-ok -= asin downward ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 0x2p-16384L : 0x2.0000000000000000000000000004p-16384L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 0x2p-16384L : 0x2p-16384L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 0x2p-16384L : 0x2.0000000000000000000000000004p-16384L : inexact-ok underflow errno-erange-ok = asin downward dbl-64 0x8p-972 : 0x8p-972 : inexact-ok = asin tonearest dbl-64 0x8p-972 : 0x8p-972 : inexact-ok = asin towardzero dbl-64 0x8p-972 : 0x8p-972 : inexact-ok @@ -2944,7 +2944,7 @@ asin min missing-underflow = asin tonearest ldbl-128ibm 0x8p-972L : 0x8p-972L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-128ibm 0x8p-972L : 0x8p-972L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-128ibm 0x8p-972L : 0x8.00000000000000000000000004p-972L : inexact-ok underflow-ok errno-erange-ok -asin -min missing-underflow +asin -min = asin downward flt-32 -0x4p-128f : -0x4.000008p-128f : inexact-ok underflow-ok errno-erange-ok = asin tonearest flt-32 -0x4p-128f : -0x4p-128f : inexact-ok underflow-ok errno-erange-ok = asin towardzero flt-32 -0x4p-128f : -0x4p-128f : inexact-ok underflow-ok errno-erange-ok @@ -2985,10 +2985,10 @@ asin -min missing-underflow = asin tonearest ldbl-128 -0x4p-1024L : -0x4p-1024L : inexact-ok = asin towardzero ldbl-128 -0x4p-1024L : -0x4p-1024L : inexact-ok = asin upward ldbl-128 -0x4p-1024L : -0x4p-1024L : inexact-ok -= asin downward ldbl-128ibm -0x4p-1024L : -0x4.0000000000004p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128ibm -0x4p-1024L : -0x4.0000000000004p-1024L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128ibm -0x4p-1024L : -0x4p-1024L : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-intel -0x4p-16384L : -0x4.0000000000000008p-16384L : inexact-ok underflow-ok errno-erange-ok = asin tonearest ldbl-96-intel -0x4p-16384L : -0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-96-intel -0x4p-16384L : -0x4p-16384L : inexact-ok underflow-ok errno-erange-ok @@ -3001,18 +3001,18 @@ asin -min missing-underflow = asin tonearest ldbl-128 -0x4p-16384L : -0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-128 -0x4p-16384L : -0x4p-16384L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-128 -0x4p-16384L : -0x4p-16384L : inexact-ok underflow-ok errno-erange-ok -= asin downward ldbl-96-intel -0x2p-16384L : -0x2.0000000000000008p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-96-intel -0x2p-16384L : -0x2.0000000000000008p-16384L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-intel -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-m68k -0x2p-16384L : -0x2.0000000000000004p-16384L : inexact-ok underflow-ok errno-erange-ok = asin tonearest ldbl-96-m68k -0x2p-16384L : -0x2p-16384L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-96-m68k -0x2p-16384L : -0x2p-16384L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-96-m68k -0x2p-16384L : -0x2p-16384L : inexact-ok underflow-ok errno-erange-ok -= asin downward ldbl-128 -0x2p-16384L : -0x2.0000000000000000000000000004p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128 -0x2p-16384L : -0x2.0000000000000000000000000004p-16384L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 -0x2p-16384L : -0x2p-16384L : inexact-ok underflow errno-erange-ok = asin downward dbl-64 -0x8p-972 : -0x8.0000000000008p-972 : inexact-ok = asin tonearest dbl-64 -0x8p-972 : -0x8p-972 : inexact-ok = asin towardzero dbl-64 -0x8p-972 : -0x8p-972 : inexact-ok @@ -3033,11 +3033,11 @@ asin -min missing-underflow = asin tonearest ldbl-128ibm -0x8p-972L : -0x8p-972L : inexact-ok underflow-ok errno-erange-ok = asin towardzero ldbl-128ibm -0x8p-972L : -0x8p-972L : inexact-ok underflow-ok errno-erange-ok = asin upward ldbl-128ibm -0x8p-972L : -0x8p-972L : inexact-ok underflow-ok errno-erange-ok -asin min_subnorm missing-underflow -= asin downward flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward flt-32 0x8p-152f : 0x1p-148f : inexact-ok underflow underflow-ok errno-erange-ok +asin min_subnorm += asin downward flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow errno-erange-ok += asin tonearest flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow errno-erange-ok += asin towardzero flt-32 0x8p-152f : 0x8p-152f : inexact-ok underflow errno-erange-ok += asin upward flt-32 0x8p-152f : 0x1p-148f : inexact-ok underflow errno-erange-ok = asin downward dbl-64 0x8p-152 : 0x8p-152 : inexact-ok = asin tonearest dbl-64 0x8p-152 : 0x8p-152 : inexact-ok = asin towardzero dbl-64 0x8p-152 : 0x8p-152 : inexact-ok @@ -3058,10 +3058,10 @@ asin min_subnorm missing-underflow = asin tonearest ldbl-128ibm 0x8p-152L : 0x8p-152L : inexact-ok = asin towardzero ldbl-128ibm 0x8p-152L : 0x8p-152L : inexact-ok = asin upward ldbl-128ibm 0x8p-152L : 0x8.00000000000000000000000004p-152L : inexact-ok -= asin downward dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward dbl-64 0x4p-1076 : 0x8p-1076 : inexact-ok underflow underflow-ok errno-erange-ok += asin downward dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow errno-erange-ok += asin tonearest dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow errno-erange-ok += asin towardzero dbl-64 0x4p-1076 : 0x4p-1076 : inexact-ok underflow errno-erange-ok += asin upward dbl-64 0x4p-1076 : 0x8p-1076 : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-intel 0x4p-1076L : 0x4p-1076L : inexact-ok = asin tonearest ldbl-96-intel 0x4p-1076L : 0x4p-1076L : inexact-ok = asin towardzero ldbl-96-intel 0x4p-1076L : 0x4p-1076L : inexact-ok @@ -3074,39 +3074,39 @@ asin min_subnorm missing-underflow = asin tonearest ldbl-128 0x4p-1076L : 0x4p-1076L : inexact-ok = asin towardzero ldbl-128 0x4p-1076L : 0x4p-1076L : inexact-ok = asin upward ldbl-128 0x4p-1076L : 0x4.0000000000000000000000000004p-1076L : inexact-ok -= asin downward ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128ibm 0x4p-1076L : 0x8p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-intel 0x8p-16448L : 0x1p-16444L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-m68k 0x8p-16448L : 0xcp-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 0x8p-16448L : 0x8.000000000004p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-m68k 0x4p-16448L : 0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 0x4p-16448L : 0x4.000000000004p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 0x4p-16496L : 0x8p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -asin -min_subnorm missing-underflow -= asin downward flt-32 -0x8p-152f : -0x1p-148f : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128ibm 0x4p-1076L : 0x4p-1076L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128ibm 0x4p-1076L : 0x8p-1076L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-intel 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-intel 0x8p-16448L : 0x1p-16444L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-m68k 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-m68k 0x8p-16448L : 0xcp-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 0x8p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 0x8p-16448L : 0x8.000000000004p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-m68k 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-m68k 0x4p-16448L : 0x8p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 0x4p-16448L : 0x4p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 0x4p-16448L : 0x4.000000000004p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 0x4p-16496L : 0x4p-16496L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 0x4p-16496L : 0x8p-16496L : inexact-ok underflow errno-erange-ok +asin -min_subnorm += asin downward flt-32 -0x8p-152f : -0x1p-148f : inexact-ok underflow errno-erange-ok += asin tonearest flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow errno-erange-ok += asin towardzero flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow errno-erange-ok += asin upward flt-32 -0x8p-152f : -0x8p-152f : inexact-ok underflow errno-erange-ok = asin downward dbl-64 -0x8p-152 : -0x8.0000000000008p-152 : inexact-ok = asin tonearest dbl-64 -0x8p-152 : -0x8p-152 : inexact-ok = asin towardzero dbl-64 -0x8p-152 : -0x8p-152 : inexact-ok @@ -3127,10 +3127,10 @@ asin -min_subnorm missing-underflow = asin tonearest ldbl-128ibm -0x8p-152L : -0x8p-152L : inexact-ok = asin towardzero ldbl-128ibm -0x8p-152L : -0x8p-152L : inexact-ok = asin upward ldbl-128ibm -0x8p-152L : -0x8p-152L : inexact-ok -= asin downward dbl-64 -0x4p-1076 : -0x8p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow underflow-ok errno-erange-ok += asin downward dbl-64 -0x4p-1076 : -0x8p-1076 : inexact-ok underflow errno-erange-ok += asin tonearest dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow errno-erange-ok += asin towardzero dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow errno-erange-ok += asin upward dbl-64 -0x4p-1076 : -0x4p-1076 : inexact-ok underflow errno-erange-ok = asin downward ldbl-96-intel -0x4p-1076L : -0x4.0000000000000008p-1076L : inexact-ok = asin tonearest ldbl-96-intel -0x4p-1076L : -0x4p-1076L : inexact-ok = asin towardzero ldbl-96-intel -0x4p-1076L : -0x4p-1076L : inexact-ok @@ -3143,34 +3143,34 @@ asin -min_subnorm missing-underflow = asin tonearest ldbl-128 -0x4p-1076L : -0x4p-1076L : inexact-ok = asin towardzero ldbl-128 -0x4p-1076L : -0x4p-1076L : inexact-ok = asin upward ldbl-128 -0x4p-1076L : -0x4p-1076L : inexact-ok -= asin downward ldbl-128ibm -0x4p-1076L : -0x8p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-intel -0x8p-16448L : -0x1p-16444L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-m68k -0x8p-16448L : -0xcp-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 -0x8p-16448L : -0x8.000000000004p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-96-m68k -0x4p-16448L : -0x8p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 -0x4p-16448L : -0x4.000000000004p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow underflow-ok errno-erange-ok -= asin downward ldbl-128 -0x4p-16496L : -0x8p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin tonearest ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin towardzero ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok -= asin upward ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow underflow-ok errno-erange-ok += asin downward ldbl-128ibm -0x4p-1076L : -0x8p-1076L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128ibm -0x4p-1076L : -0x4p-1076L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-intel -0x8p-16448L : -0x1p-16444L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-intel -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-m68k -0x8p-16448L : -0xcp-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-m68k -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 -0x8p-16448L : -0x8.000000000004p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 -0x8p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-96-m68k -0x4p-16448L : -0x8p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-96-m68k -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 -0x4p-16448L : -0x4.000000000004p-16448L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 -0x4p-16448L : -0x4p-16448L : inexact-ok underflow errno-erange-ok += asin downward ldbl-128 -0x4p-16496L : -0x8p-16496L : inexact-ok underflow errno-erange-ok += asin tonearest ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow errno-erange-ok += asin towardzero ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow errno-erange-ok += asin upward ldbl-128 -0x4p-16496L : -0x4p-16496L : inexact-ok underflow errno-erange-ok asinh 0 = asinh downward flt-32 0x0p+0f : 0x0p+0f : inexact-ok = asinh tonearest flt-32 0x0p+0f : 0x0p+0f : inexact-ok diff --git a/sysdeps/i386/fpu/e_asin.S b/sysdeps/i386/fpu/e_asin.S index 9a44cb62ac..ea8cb6f1b2 100644 --- a/sysdeps/i386/fpu/e_asin.S +++ b/sysdeps/i386/fpu/e_asin.S @@ -7,8 +7,26 @@ RCSID("$NetBSD: e_asin.S,v 1.4 1995/05/08 23:45:40 jtc Exp $") + .section .rodata.cst8,"aM",@progbits,8 + + .p2align 3 + .type dbl_min,@object +dbl_min: .byte 0, 0, 0, 0, 0, 0, 0x10, 0 + ASM_SIZE_DIRECTIVE(dbl_min) + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text + /* asin = atan (x / sqrt((1-x) (1+x))) */ ENTRY(__ieee754_asin) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif fldl 4(%esp) /* x */ fld %st fld1 /* 1 : x : x */ @@ -18,6 +36,20 @@ ENTRY(__ieee754_asin) fmulp /* 1 - x^2 */ fsqrt /* sqrt (1 - x^2) */ fpatan - ret + fldl MO(dbl_min) + fld %st(1) + fabs + fucompp + fnstsw + sahf + jnc 1f + subl $8, %esp + cfi_adjust_cfa_offset (8) + fld %st(0) + fmul %st(0) + fstpl (%esp) + addl $8, %esp + cfi_adjust_cfa_offset (-8) +1: ret END (__ieee754_asin) strong_alias (__ieee754_asin, __asin_finite) diff --git a/sysdeps/i386/fpu/e_asinf.S b/sysdeps/i386/fpu/e_asinf.S index 5c1065dd4d..f7bda77fa6 100644 --- a/sysdeps/i386/fpu/e_asinf.S +++ b/sysdeps/i386/fpu/e_asinf.S @@ -8,8 +8,26 @@ RCSID("$NetBSD: $") + .section .rodata.cst4,"aM",@progbits,4 + + .p2align 2 + .type flt_min,@object +flt_min: .byte 0, 0, 0x80, 0 + ASM_SIZE_DIRECTIVE(flt_min) + +#ifdef PIC +# define MO(op) op##@GOTOFF(%ecx) +#else +# define MO(op) op +#endif + + .text + /* asin = atan (x / sqrt(1 - x^2)) */ ENTRY(__ieee754_asinf) +#ifdef PIC + LOAD_PIC_REG (cx) +#endif flds 4(%esp) /* x */ fld %st fmul %st(0) /* x^2 */ @@ -17,6 +35,20 @@ ENTRY(__ieee754_asinf) fsubp /* 1 - x^2 */ fsqrt /* sqrt (1 - x^2) */ fpatan - ret + flds MO(flt_min) + fld %st(1) + fabs + fucompp + fnstsw + sahf + jnc 1f + subl $4, %esp + cfi_adjust_cfa_offset (4) + fld %st(0) + fmul %st(0) + fstps (%esp) + addl $4, %esp + cfi_adjust_cfa_offset (-4) +1: ret END (__ieee754_asinf) strong_alias (__ieee754_asinf, __asinf_finite) diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c index e90f47ccc2..b87e557988 100644 --- a/sysdeps/ieee754/dbl-64/e_asin.c +++ b/sysdeps/ieee754/dbl-64/e_asin.c @@ -39,6 +39,8 @@ #include "powtwo.tbl" #include "MathLib.h" #include "uasncs.h" +#include <float.h> +#include <math.h> #include <math_private.h> #ifndef SECTION @@ -67,7 +69,15 @@ __ieee754_asin(double x){ m = u.i[HIGH_HALF]; k = 0x7fffffff&m; /* no sign */ - if (k < 0x3e500000) return x; /* for x->0 => sin(x)=x */ + if (k < 0x3e500000) + { + if (fabs (x) < DBL_MIN) + { + double force_underflow = x * x; + math_force_eval (force_underflow); + } + return x; /* for x->0 => sin(x)=x */ + } /*----------------------2^-26 <= |x| < 2^ -3 -----------------*/ else if (k < 0x3fc00000) { diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c index 91ca9afd00..00bad4239b 100644 --- a/sysdeps/ieee754/flt-32/e_asinf.c +++ b/sysdeps/ieee754/flt-32/e_asinf.c @@ -39,6 +39,7 @@ static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $"; #endif +#include <float.h> #include <math.h> #include <math_private.h> @@ -72,6 +73,11 @@ float __ieee754_asinf(float x) return (x-x)/(x-x); /* asin(|x|>1) is NaN */ } else if (ix<0x3f000000) { /* |x|<0.5 */ if(ix<0x32000000) { /* if |x| < 2**-27 */ + if (fabsf (x) < FLT_MIN) + { + float force_underflow = x * x; + math_force_eval (force_underflow); + } if(huge+x>one) return x;/* return x with inexact if x!=0*/ } else { t = x*x; diff --git a/sysdeps/ieee754/ldbl-128/e_asinl.c b/sysdeps/ieee754/ldbl-128/e_asinl.c index cd1a8da42c..353603d68c 100644 --- a/sysdeps/ieee754/ldbl-128/e_asinl.c +++ b/sysdeps/ieee754/ldbl-128/e_asinl.c @@ -59,6 +59,7 @@ */ +#include <float.h> #include <math.h> #include <math_private.h> long double sqrtl (long double); @@ -152,6 +153,11 @@ __ieee754_asinl (long double x) { if (ix < 0x3fc60000) /* |x| < 2**-57 */ { + if (fabsl (x) < LDBL_MIN) + { + long double force_underflow = x * x; + math_force_eval (force_underflow); + } if (huge + x > one) return x; /* return x with inexact if x!=0 */ } diff --git a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c index dece11875b..00386db04e 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c @@ -59,6 +59,7 @@ */ +#include <float.h> #include <math.h> #include <math_private.h> long double sqrtl (long double); @@ -146,6 +147,11 @@ __ieee754_asinl (long double x) { if (a < 6.938893903907228e-18L) /* |x| < 2**-57 */ { + if (fabsl (x) < LDBL_MIN) + { + long double force_underflow = x * x; + math_force_eval (force_underflow); + } if (huge + x > one) return x; /* return x with inexact if x!=0 */ } diff --git a/sysdeps/ieee754/ldbl-96/e_asinl.c b/sysdeps/ieee754/ldbl-96/e_asinl.c index c1ffa3e0d9..2973bf071b 100644 --- a/sysdeps/ieee754/ldbl-96/e_asinl.c +++ b/sysdeps/ieee754/ldbl-96/e_asinl.c @@ -58,6 +58,7 @@ */ +#include <float.h> #include <math.h> #include <math_private.h> @@ -111,6 +112,11 @@ __ieee754_asinl (long double x) { /* |x|<0.5 */ if (ix < 0x3fde8000) { /* if |x| < 2**-33 */ + if (fabsl (x) < LDBL_MIN) + { + long double force_underflow = x * x; + math_force_eval (force_underflow); + } if (huge + x > one) return x; /* return x with inexact if x!=0 */ } diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c index e742a9c133..55865c02f3 100644 --- a/sysdeps/x86_64/fpu/multiarch/e_asin.c +++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c @@ -1,5 +1,6 @@ #ifdef HAVE_FMA4_SUPPORT # include <init-arch.h> +# include <math.h> # include <math_private.h> extern double __ieee754_acos_sse2 (double); |