From: Marco Atzeri <marco.atzeri@gmail.com>
To: newlib@sourceware.org
Subject: Re: incorrectly rounded square root
Date: Wed, 2 Jun 2021 21:07:45 +0200 [thread overview]
Message-ID: <2f8796f4-f164-5734-16ca-9a392e788beb@gmail.com> (raw)
In-Reply-To: <CAOox84t9gmn-wtS=NA4tB6XFALcVqLfAr+ynZZZjcbxHYCw_sg@mail.gmail.com>
On 02.06.2021 20:43, Jeff Johnston wrote:
> On Wed, Jun 2, 2021 at 9:08 AM Joel Sherrill <joel@rtems.org> wrote:
>
>>
>>
>> On Wed, Jun 2, 2021 at 2:51 AM Paul Zimmermann <Paul.Zimmermann@inria.fr>
>> wrote:
>>
>>
> I'll second Joel's comment. The code is extremely close to the glibc code
> both in sqrtf and fesetround. The only
> thing I can think of is that the glibc code does the x87 stuff first and
> does the set back into FPU state before doing the
> SSE stuff. The newlib code sets back the FPU state at the end after the
> SSE stuff. Don't know if this is relevant or not.
>
> Any Cygwin users out there who can verify that the code is working/not
> working for them?
>
> -- Jeff J.
>
current Cygwin produces for both i686 and X86_64
$ gcc -DNEWLIB -fno-builtin test_sqrt.c -lm
$ ./a.exe
RNDN: 0x1.ff83fp+63
RNDZ: 0x1.ff83fp+63
RNDU: 0x1.ff83fp+63
RNDD: 0x1.ff83fp+63
next prev parent reply other threads:[~2021-06-02 19:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 8:08 Paul Zimmermann
2021-05-31 20:52 ` Jeff Johnston
2021-06-01 7:11 ` Paul Zimmermann
2021-06-01 16:28 ` Jeff Johnston
2021-06-02 7:51 ` Paul Zimmermann
2021-06-02 13:07 ` Joel Sherrill
2021-06-02 18:43 ` Jeff Johnston
2021-06-02 19:07 ` Marco Atzeri [this message]
2021-06-02 19:12 ` Joel Sherrill
2021-06-03 3:01 ` Jeff Johnston
2021-06-03 10:21 ` Paul Zimmermann
2021-06-03 15:50 ` Jeff Johnston
2021-06-04 7:14 ` Paul Zimmermann
2021-06-04 18:44 ` Jeff Johnston
2021-06-04 18:59 ` Joel Sherrill
2021-06-05 13:25 ` Brian Inglis
2021-06-07 9:51 ` Paul Zimmermann
2021-06-12 22:31 ` Maciej W. Rozycki
2021-06-03 11:25 ` Paul Zimmermann
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=2f8796f4-f164-5734-16ca-9a392e788beb@gmail.com \
--to=marco.atzeri@gmail.com \
--cc=newlib@sourceware.org \
/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).