mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-31 14:01:18 +08:00
math: Fix tanf for some inputs (BZ 32630)
The logic was copied wrong from CORE-MATH. (cherry picked from commit 09e7f4d594b4308fbea18e3044148d67b59757c9)
This commit is contained in:
parent
cb7f206537
commit
cf88351b68
2
NEWS
2
NEWS
@ -11,6 +11,8 @@ The following bugs were resolved with this release:
|
||||
|
||||
[32626] math: math: log10p1f is not correctly rounded
|
||||
[32627] math: math: sinhf is not correctly rounded
|
||||
[32630] math: math: tanf is not correctly rounded for all rounding
|
||||
modes
|
||||
|
||||
Version 2.41
|
||||
|
||||
|
@ -8664,6 +8664,7 @@ tan 0x1.1ad374p+0
|
||||
tan -0x1.0d55b8p+0
|
||||
tan 1.57079697
|
||||
tan -1.57079697
|
||||
tan 0x1.ada6aap+27
|
||||
tan 0x1p-5
|
||||
tan 0x1p-10
|
||||
tan 0x1p-15
|
||||
|
@ -2532,6 +2532,31 @@ tan -1.57079697
|
||||
= tan tonearest ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5c8p+20 : inexact-ok
|
||||
= tan towardzero ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5cp+20 : inexact-ok
|
||||
= tan upward ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5c8p+20 : inexact-ok
|
||||
tan 0x1.ada6aap+27
|
||||
= tan downward binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan tonearest binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan towardzero binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan upward binary32 0xd.6d355p+24 : 0x3.d0060cp-4 : inexact-ok
|
||||
= tan downward binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan tonearest binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan towardzero binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok
|
||||
= tan upward binary64 0xd.6d355p+24 : 0x3.d006080000002p-4 : inexact-ok
|
||||
= tan downward intel96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok
|
||||
= tan tonearest intel96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok
|
||||
= tan towardzero intel96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok
|
||||
= tan upward intel96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok
|
||||
= tan downward m68k96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok
|
||||
= tan tonearest m68k96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok
|
||||
= tan towardzero m68k96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok
|
||||
= tan upward m68k96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok
|
||||
= tan downward binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok
|
||||
= tan tonearest binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok
|
||||
= tan towardzero binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok
|
||||
= tan upward binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15cp-4 : inexact-ok
|
||||
= tan downward ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok
|
||||
= tan tonearest ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok
|
||||
= tan towardzero ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok
|
||||
= tan upward ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c2p-4 : inexact-ok
|
||||
tan 0x1p-5
|
||||
= tan downward binary32 0x8p-8 : 0x8.00aabp-8 : inexact-ok
|
||||
= tan tonearest binary32 0x8p-8 : 0x8.00aacp-8 : inexact-ok
|
||||
|
@ -166,7 +166,7 @@ __tanf (float x)
|
||||
uint32_t sgn = t >> 31;
|
||||
for (int j = 0; j < array_length (st); j++)
|
||||
{
|
||||
if (__glibc_unlikely (asfloat (st[j].arg) == ax))
|
||||
if (__glibc_unlikely (asuint (st[j].arg) == ax))
|
||||
{
|
||||
if (sgn)
|
||||
return -st[j].rh - st[j].rl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user