From: Joseph Myers <joseph@codesourcery.com>
To: "Howland, Craig D. - US" <craig.howland@caci.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: i386 and x86_64 fenv support
Date: Tue, 27 Aug 2019 19:48:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.21.1908271937540.31674@digraph.polyomino.org.uk> (raw)
In-Reply-To: <1566928274715.79162@caci.com>
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On Tue, 27 Aug 2019, Howland, Craig D. - US via newlib wrote:
> That GLIBC requirement violates what the standards say. C99 says, "Each of
> the macros FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD is deï¬ned if and
> only if the implementation supports getting and setting the represented
> rounding direction by means of the fegetround and fesetround functions."
If to-nearest is the default and only rounding mode, setting it is a
no-op, so it would violate the standard not to define FE_TONEAREST, would
violate the standard not to return success from fesetround (FE_TONEAREST)
and would violate the standard not to return FE_TONEAREST from fegetround.
If a processor does not support rounding to-nearest (Cell SPU for
single-precision, for example), of course FE_TONEAREST would not be
defined (the C standard model doesn't really cover the SPU case where
single-precision is only FE_TOWARDZERO but double precision handles all
rounding modes, however).
--
Joseph S. Myers
joseph@codesourcery.com
prev parent reply other threads:[~2019-08-27 19:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 13:32 Joel Sherrill
2019-08-27 13:37 ` Eric Blake
2019-08-27 13:45 ` Joel Sherrill
2019-08-27 15:39 ` Corinna Vinschen
2019-08-27 15:46 ` Joel Sherrill
2019-08-27 15:55 ` Corinna Vinschen
2019-08-27 17:11 ` Joseph Myers
2019-08-27 17:30 ` Joel Sherrill
2019-08-27 17:51 ` Howland, Craig D. - US via newlib
2019-08-27 19:48 ` Joseph Myers [this message]
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=alpine.DEB.2.21.1908271937540.31674@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=craig.howland@caci.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).