This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] [PATCH] powerpc: Fix incorrect results for pow when using FMA
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 10 Mar 2015 17:55:08 +0000
- Subject: Re: [COMMITTED] [PATCH] powerpc: Fix incorrect results for pow when using FMA
- Authentication-results: sourceware.org; auth=none
- References: <54FEF9F7 dot 5060809 at linux dot vnet dot ibm dot com>
On Tue, 10 Mar 2015, Adhemerval Zanella wrote:
> This patch adds no FMA generation for e_pow to avoid precision issues
> for powerpc. This fixes BZ#18104.
I've added the testcase from the bug (as I understand it) to the
testsuite; tested on x86_64 and x86. Could you confirm that this new test
shows large errors before your patch?
2015-03-10 Joseph Myers <joseph@codesourcery.com>
[BZ #18104]
* math/auto-libm-test-in: Add another test of pow.
* math/auto-libm-test-out: Regenerated.
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 5e4b84d..4a9f935 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -2015,6 +2015,7 @@ pow 2.0 -100000.0
pow 1.0625 1.125
pow 1.5 1.03125
+pow 0x1.7d1a0a6f2p+681 1.5
sin 0
sin -0
diff --git a/math/auto-libm-test-out b/math/auto-libm-test-out
index 66bdeb4..223caf2 100644
--- a/math/auto-libm-test-out
+++ b/math/auto-libm-test-out
@@ -166089,6 +166089,51 @@ pow 1.5 1.03125
= pow tonearest ldbl-128ibm 0x1.8p+0L 0x1.08p+0L : 0x1.84e58377727ac18c4b0e8b54f08p+0L : inexact-ok
= pow towardzero ldbl-128ibm 0x1.8p+0L 0x1.08p+0L : 0x1.84e58377727ac18c4b0e8b54f08p+0L : inexact-ok
= pow upward ldbl-128ibm 0x1.8p+0L 0x1.08p+0L : 0x1.84e58377727ac18c4b0e8b54f1p+0L : inexact-ok
+pow 0x1.7d1a0a6f2p+681 1.5
+= pow downward flt-32 0xf.fffffp+124f 0x1.8p+0f : 0xf.fffffp+124f : inexact-ok overflow errno-erange-ok
+= pow tonearest flt-32 0xf.fffffp+124f 0x1.8p+0f : plus_infty : inexact-ok overflow errno-erange
+= pow towardzero flt-32 0xf.fffffp+124f 0x1.8p+0f : 0xf.fffffp+124f : inexact-ok overflow errno-erange-ok
+= pow upward flt-32 0xf.fffffp+124f 0x1.8p+0f : plus_infty : inexact-ok overflow errno-erange
+= pow downward dbl-64 0xf.fffffp+124 0x1.8p+0 : 0xf.ffffe8000006p+188 : inexact-ok
+= pow tonearest dbl-64 0xf.fffffp+124 0x1.8p+0 : 0xf.ffffe8000006p+188 : inexact-ok
+= pow towardzero dbl-64 0xf.fffffp+124 0x1.8p+0 : 0xf.ffffe8000006p+188 : inexact-ok
+= pow upward dbl-64 0xf.fffffp+124 0x1.8p+0 : 0xf.ffffe80000068p+188 : inexact-ok
+= pow downward ldbl-96-intel 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow tonearest ldbl-96-intel 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow towardzero ldbl-96-intel 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow upward ldbl-96-intel 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006001p+188L : inexact-ok
+= pow downward ldbl-96-m68k 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow tonearest ldbl-96-m68k 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow towardzero ldbl-96-m68k 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006p+188L : inexact-ok
+= pow upward ldbl-96-m68k 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe8000006001p+188L : inexact-ok
+= pow downward ldbl-128 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow tonearest ldbl-128 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow towardzero ldbl-128 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow upward ldbl-128 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006008p+188L : inexact-ok
+= pow downward ldbl-128ibm 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow tonearest ldbl-128ibm 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow towardzero ldbl-128ibm 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe80000060000010000006p+188L : inexact-ok
+= pow upward ldbl-128ibm 0xf.fffffp+124L 0x1.8p+0L : 0xf.ffffe800000600000100000064p+188L : inexact-ok
+= pow downward dbl-64 0x2.fa3414de4p+680 0x1.8p+0 : 0x5.232efee410298p+1020 : inexact-ok
+= pow tonearest dbl-64 0x2.fa3414de4p+680 0x1.8p+0 : 0x5.232efee410298p+1020 : inexact-ok
+= pow towardzero dbl-64 0x2.fa3414de4p+680 0x1.8p+0 : 0x5.232efee410298p+1020 : inexact-ok
+= pow upward dbl-64 0x2.fa3414de4p+680 0x1.8p+0 : 0x5.232efee41029cp+1020 : inexact-ok
+= pow downward ldbl-96-intel 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow tonearest ldbl-96-intel 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow towardzero ldbl-96-intel 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow upward ldbl-96-intel 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow downward ldbl-96-m68k 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow tonearest ldbl-96-m68k 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow towardzero ldbl-96-m68k 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow upward ldbl-96-m68k 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow downward ldbl-128 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow tonearest ldbl-128 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow towardzero ldbl-128 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow upward ldbl-128 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow downward ldbl-128ibm 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow tonearest ldbl-128ibm 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow towardzero ldbl-128ibm 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
+= pow upward ldbl-128ibm 0x2.fa3414de4p+680L 0x1.8p+0L : 0x5.232efee41029ap+1020L : inexact-ok
sin 0
= sin downward flt-32 0x0p+0f : 0x0p+0f : inexact-ok
= sin tonearest flt-32 0x0p+0f : 0x0p+0f : inexact-ok
--
Joseph S. Myers
joseph@codesourcery.com