From 827bb5859c2b3e0471d6273617368fc76a821e6e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 1 May 2015 22:41:00 +0000 Subject: Add more tests of cos, sin, sincos. This patch adds some randomly-generated tests of cos, sin and sincos that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of cos, sin and sincos. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. --- math/auto-libm-test-in | 3 ++ math/auto-libm-test-out | 135 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) (limited to 'math') diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index 788c30a..b8f71ee 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -865,6 +865,7 @@ cos min cos -min cos min_subnorm cos -min_subnorm +cos -0x3.3de320f6be87ep+1020 cosh 0 cosh -0 @@ -2241,6 +2242,7 @@ sin 8 sin 9 sin 10 sin 0x1.2001469775ce6p32 +sin -0x3.3de320f6be87ep+1020 sincos 0 sincos -0 @@ -2260,6 +2262,7 @@ sincos 0x1.fffff8p+127 sincos 0x1.fffffep+127 sincos 0x1p+50 sincos 0x1p+28 +sincos -0x3.3de320f6be87ep+1020 sinh 0 sinh -0 diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out index ed5b311..10a3034 100644 --- a/math/auto-libm-test-out +++ b/math/auto-libm-test-out @@ -84279,6 +84279,51 @@ cos -min_subnorm = cos tonearest ldbl-128 -0x4p-16496L : 0x1p+0L : inexact-ok = cos towardzero ldbl-128 -0x4p-16496L : 0xf.fffffffffffffffffffffffffff8p-4L : inexact-ok = cos upward ldbl-128 -0x4p-16496L : 0x1p+0L : inexact-ok +cos -0x3.3de320f6be87ep+1020 += cos downward flt-32 -0xf.fffffp+124f : 0xd.a5f96p-4f : inexact-ok += cos tonearest flt-32 -0xf.fffffp+124f : 0xd.a5f96p-4f : inexact-ok += cos towardzero flt-32 -0xf.fffffp+124f : 0xd.a5f96p-4f : inexact-ok += cos upward flt-32 -0xf.fffffp+124f : 0xd.a5f97p-4f : inexact-ok += cos downward dbl-64 -0xf.fffffp+124 : 0xd.a5f963cdefe68p-4 : inexact-ok += cos tonearest dbl-64 -0xf.fffffp+124 : 0xd.a5f963cdefe7p-4 : inexact-ok += cos towardzero dbl-64 -0xf.fffffp+124 : 0xd.a5f963cdefe68p-4 : inexact-ok += cos upward dbl-64 -0xf.fffffp+124 : 0xd.a5f963cdefe7p-4 : inexact-ok += cos downward ldbl-96-intel -0xf.fffffp+124L : 0xd.a5f963cdefe6d52p-4L : inexact-ok += cos tonearest ldbl-96-intel -0xf.fffffp+124L : 0xd.a5f963cdefe6d53p-4L : inexact-ok += cos towardzero ldbl-96-intel -0xf.fffffp+124L : 0xd.a5f963cdefe6d52p-4L : inexact-ok += cos upward ldbl-96-intel -0xf.fffffp+124L : 0xd.a5f963cdefe6d53p-4L : inexact-ok += cos downward ldbl-96-m68k -0xf.fffffp+124L : 0xd.a5f963cdefe6d52p-4L : inexact-ok += cos tonearest ldbl-96-m68k -0xf.fffffp+124L : 0xd.a5f963cdefe6d53p-4L : inexact-ok += cos towardzero ldbl-96-m68k -0xf.fffffp+124L : 0xd.a5f963cdefe6d52p-4L : inexact-ok += cos upward ldbl-96-m68k -0xf.fffffp+124L : 0xd.a5f963cdefe6d53p-4L : inexact-ok += cos downward ldbl-128 -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += cos tonearest ldbl-128 -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += cos towardzero ldbl-128 -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += cos upward ldbl-128 -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb2f8p-4L : inexact-ok += cos downward ldbl-128ibm -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fbp-4L : inexact-ok += cos tonearest ldbl-128ibm -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb4p-4L : inexact-ok += cos towardzero ldbl-128ibm -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fbp-4L : inexact-ok += cos upward ldbl-128ibm -0xf.fffffp+124L : 0xd.a5f963cdefe6d529f6b6009fb4p-4L : inexact-ok += cos downward dbl-64 -0x3.3de320f6be87ep+1020 : -0x1.febbf9949ecc2p-4 : inexact-ok += cos tonearest dbl-64 -0x3.3de320f6be87ep+1020 : -0x1.febbf9949ecc1p-4 : inexact-ok += cos towardzero dbl-64 -0x3.3de320f6be87ep+1020 : -0x1.febbf9949ecc1p-4 : inexact-ok += cos upward dbl-64 -0x3.3de320f6be87ep+1020 : -0x1.febbf9949ecc1p-4 : inexact-ok += cos downward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1338p-4L : inexact-ok += cos tonearest ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos towardzero ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos upward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos downward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1338p-4L : inexact-ok += cos tonearest ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos towardzero ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos upward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc1336p-4L : inexact-ok += cos downward ldbl-128 -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5a28p-4L : inexact-ok += cos tonearest ldbl-128 -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += cos towardzero ldbl-128 -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += cos upward ldbl-128 -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += cos downward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5a8p-4L : inexact-ok += cos tonearest ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok += cos towardzero ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok += cos upward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok cosh 0 = cosh downward flt-32 0x0p+0f : 0x1p+0f : inexact-ok = cosh tonearest flt-32 0x0p+0f : 0x1p+0f : inexact-ok @@ -176040,6 +176085,51 @@ sin 0x1.2001469775ce6p32 = sin tonearest ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok = sin towardzero ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok = sin upward ldbl-128ibm 0x1.2001469775ce6p+32L : -0x6.444fda50019f9f5ba3779ca706p-4L : inexact-ok +sin -0x3.3de320f6be87ep+1020 += sin downward flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f : inexact-ok += sin tonearest flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f : inexact-ok += sin towardzero flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f : inexact-ok += sin upward flt-32 -0xf.fffffp+124f : 0x8.599b4p-4f : inexact-ok += sin downward dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 : inexact-ok += sin tonearest dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 : inexact-ok += sin towardzero dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 : inexact-ok += sin upward dbl-64 -0xf.fffffp+124 : 0x8.599b32844abbp-4 : inexact-ok += sin downward ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba906p-4L : inexact-ok += sin tonearest ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba907p-4L : inexact-ok += sin towardzero ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba906p-4L : inexact-ok += sin upward ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba907p-4L : inexact-ok += sin downward ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba906p-4L : inexact-ok += sin tonearest ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba907p-4L : inexact-ok += sin towardzero ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba906p-4L : inexact-ok += sin upward ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba907p-4L : inexact-ok += sin downward ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L : inexact-ok += sin tonearest ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L : inexact-ok += sin towardzero ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L : inexact-ok += sin upward ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be049ap-4L : inexact-ok += sin downward ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L : inexact-ok += sin tonearest ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L : inexact-ok += sin towardzero ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L : inexact-ok += sin upward ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04cp-4L : inexact-ok += sin downward dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd78p-4 : inexact-ok += sin tonearest dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd78p-4 : inexact-ok += sin towardzero dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd7p-4 : inexact-ok += sin upward dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd7p-4 : inexact-ok += sin downward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L : inexact-ok += sin tonearest ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L : inexact-ok += sin towardzero ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L : inexact-ok += sin upward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L : inexact-ok += sin downward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L : inexact-ok += sin tonearest ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L : inexact-ok += sin towardzero ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L : inexact-ok += sin upward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L : inexact-ok += sin downward ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61f8p-4L : inexact-ok += sin tonearest ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61f8p-4L : inexact-ok += sin towardzero ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61fp-4L : inexact-ok += sin upward ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61fp-4L : inexact-ok += sin downward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb64p-4L : inexact-ok += sin tonearest ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L : inexact-ok += sin towardzero ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L : inexact-ok += sin upward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L : inexact-ok sincos 0 = sincos downward flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok = sincos tonearest flt-32 0x0p+0f : 0x0p+0f 0x1p+0f : inexact-ok @@ -177074,6 +177164,51 @@ sincos 0x1p+28 = sincos tonearest ldbl-128ibm 0x1p+28L : -0xf.c777c6b36a750a5fdeb8807a14p-4L -0x2.a62ba8824e5bcb065f5f3b8e4fp-4L : inexact-ok = sincos towardzero ldbl-128ibm 0x1p+28L : -0xf.c777c6b36a750a5fdeb8807a14p-4L -0x2.a62ba8824e5bcb065f5f3b8e4fp-4L : inexact-ok = sincos upward ldbl-128ibm 0x1p+28L : -0xf.c777c6b36a750a5fdeb8807a14p-4L -0x2.a62ba8824e5bcb065f5f3b8e4fp-4L : inexact-ok +sincos -0x3.3de320f6be87ep+1020 += sincos downward flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f 0xd.a5f96p-4f : inexact-ok += sincos tonearest flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f 0xd.a5f96p-4f : inexact-ok += sincos towardzero flt-32 -0xf.fffffp+124f : 0x8.599b3p-4f 0xd.a5f96p-4f : inexact-ok += sincos upward flt-32 -0xf.fffffp+124f : 0x8.599b4p-4f 0xd.a5f97p-4f : inexact-ok += sincos downward dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 0xd.a5f963cdefe68p-4 : inexact-ok += sincos tonearest dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 0xd.a5f963cdefe7p-4 : inexact-ok += sincos towardzero dbl-64 -0xf.fffffp+124 : 0x8.599b32844aba8p-4 0xd.a5f963cdefe68p-4 : inexact-ok += sincos upward dbl-64 -0xf.fffffp+124 : 0x8.599b32844abbp-4 0xd.a5f963cdefe7p-4 : inexact-ok += sincos downward ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba906p-4L 0xd.a5f963cdefe6d52p-4L : inexact-ok += sincos tonearest ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba907p-4L 0xd.a5f963cdefe6d53p-4L : inexact-ok += sincos towardzero ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba906p-4L 0xd.a5f963cdefe6d52p-4L : inexact-ok += sincos upward ldbl-96-intel -0xf.fffffp+124L : 0x8.599b32844aba907p-4L 0xd.a5f963cdefe6d53p-4L : inexact-ok += sincos downward ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba906p-4L 0xd.a5f963cdefe6d52p-4L : inexact-ok += sincos tonearest ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba907p-4L 0xd.a5f963cdefe6d53p-4L : inexact-ok += sincos towardzero ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba906p-4L 0xd.a5f963cdefe6d52p-4L : inexact-ok += sincos upward ldbl-96-m68k -0xf.fffffp+124L : 0x8.599b32844aba907p-4L 0xd.a5f963cdefe6d53p-4L : inexact-ok += sincos downward ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += sincos tonearest ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += sincos towardzero ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04998p-4L 0xd.a5f963cdefe6d529f6b6009fb2fp-4L : inexact-ok += sincos upward ldbl-128 -0xf.fffffp+124L : 0x8.599b32844aba906cee446be049ap-4L 0xd.a5f963cdefe6d529f6b6009fb2f8p-4L : inexact-ok += sincos downward ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L 0xd.a5f963cdefe6d529f6b6009fbp-4L : inexact-ok += sincos tonearest ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L 0xd.a5f963cdefe6d529f6b6009fb4p-4L : inexact-ok += sincos towardzero ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be048p-4L 0xd.a5f963cdefe6d529f6b6009fbp-4L : inexact-ok += sincos upward ldbl-128ibm -0xf.fffffp+124L : 0x8.599b32844aba906cee446be04cp-4L 0xd.a5f963cdefe6d529f6b6009fb4p-4L : inexact-ok += sincos downward dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd78p-4 -0x1.febbf9949ecc2p-4 : inexact-ok += sincos tonearest dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd78p-4 -0x1.febbf9949ecc1p-4 : inexact-ok += sincos towardzero dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd7p-4 -0x1.febbf9949ecc1p-4 : inexact-ok += sincos upward dbl-64 -0x3.3de320f6be87ep+1020 : -0xf.e00885042dd7p-4 -0x1.febbf9949ecc1p-4 : inexact-ok += sincos downward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L -0x1.febbf9949ecc1338p-4L : inexact-ok += sincos tonearest ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos towardzero ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos upward ldbl-96-intel -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos downward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L -0x1.febbf9949ecc1338p-4L : inexact-ok += sincos tonearest ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770dp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos towardzero ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos upward ldbl-96-m68k -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770cp-4L -0x1.febbf9949ecc1336p-4L : inexact-ok += sincos downward ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61f8p-4L -0x1.febbf9949ecc133623bb8c8c5a28p-4L : inexact-ok += sincos tonearest ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61f8p-4L -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += sincos towardzero ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61fp-4L -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += sincos upward ldbl-128 -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb61fp-4L -0x1.febbf9949ecc133623bb8c8c5a27p-4L : inexact-ok += sincos downward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb64p-4L -0x1.febbf9949ecc133623bb8c8c5a8p-4L : inexact-ok += sincos tonearest ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok += sincos towardzero ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok += sincos upward ldbl-128ibm -0x3.3de320f6be87ep+1020L : -0xf.e00885042dd770c93962abdb6p-4L -0x1.febbf9949ecc133623bb8c8c5ap-4L : inexact-ok sinh 0 = sinh downward flt-32 0x0p+0f : 0x0p+0f : inexact-ok = sinh tonearest flt-32 0x0p+0f : 0x0p+0f : inexact-ok -- cgit v1.1