From: David Miller <davem@davemloft.net>
To: joseph@codesourcery.com
Cc: stli@linux.vnet.ibm.com, libc-alpha@sourceware.org
Subject: Re: [PATCH COMMITTED] Regenerate sparc ULPs.
Date: Mon, 28 Apr 2014 19:50:00 -0000 [thread overview]
Message-ID: <20140428.155029.1127526647005038603.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1404231505030.13425@digraph.polyomino.org.uk>
From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Wed, 23 Apr 2014 15:07:11 +0000
> On Mon, 14 Apr 2014, David Miller wrote:
>
>> From: Stefan Liebler <stli@linux.vnet.ibm.com>
>> Date: Mon, 14 Apr 2014 10:56:24 +0200
>>
>> > on s390 test-ldouble / test-ildoubl shows the same ULP for y1(0x2p+0)
>> > (see https://www.sourceware.org/ml/libc-alpha/2014-04/msg00271.html).
>> >
>> > Please test the posted patch.
>>
>> Yep, it clears the long-double cases for me.
>>
>> I still have a large ULP of 10 for test-float's y1_upward().
>
> I'm going to guess that this doesn't appear on x86_64 because of the
> x86_64 implementation of trig functions using double precision internally
> so having smaller error accumulation than the generic flt-32 versions.
> Saving / restoring the rounding mode in y1f would seem a reasonable
> solution.
The following does the trick for me, any objections?
It would also be great if Stefan Liebler's bug fix at:
https://sourceware.org/ml/libc-alpha/2014-04/msg00148.html
got approved as well as that fixes the only other major math test
failure I was seeing on sparc.
Thanks!
2014-04-28 David S. Miller <davem@davemloft.net>
* sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Set
round-to-nearest internally in the "|x| >= 2.0" code paths to
reduce error accumulation.
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index cb9f97f..a180968 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -107,6 +107,7 @@ __ieee754_y1f(float x)
return -HUGE_VALF+x; /* -inf and overflow exception. */
if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ SET_RESTORE_ROUNDF (FE_TONEAREST);
__sincosf (x, &s, &c);
ss = -s-c;
cc = s-c;
next prev parent reply other threads:[~2014-04-28 19:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 3:11 David Miller
2014-04-14 8:56 ` Stefan Liebler
2014-04-14 17:37 ` David Miller
2014-04-23 15:07 ` Joseph S. Myers
2014-04-23 17:04 ` David Miller
2014-04-28 19:50 ` David Miller [this message]
2014-04-23 14:51 ` Joseph S. Myers
2014-04-23 17:03 ` David Miller
2015-07-16 19:04 [PATCH COMMITTED] Regenerate SPARC ULPs David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140428.155029.1127526647005038603.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).