public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: fmax/fmin sNaN compatibility question
Date: Tue, 10 Dec 2019 18:05:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.21.1912101803360.4700@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20191210104358.4F372D80305@oc3748833570.ibm.com>

On Tue, 10 Dec 2019, Ulrich Weigand wrote:

> Joseph Myers wrote:
> > On Mon, 9 Dec 2019, Ulrich Weigand wrote:
> > > Do you know why the sample implementation was even updated then?
> > > If FP_SNANS_ALWAYS_SIGNAL is false, shouldn't the C11 method then
> > > still be OK?
> > 
> > The canonicalize call is needed in general to avoid propagating 
> > noncanonical DFP encodings, though not relevant for binary FP.
> 
> But it does change the behavior for binary FP as well, as far
> as I can see: e.g. if both inputs are sNaNs, the C11 method
> would return one of those sNaNs unchanged, while the C2x method
> will return a qNaN (as the canonicalize call will quiet the
> sNaN it receives as input), right?

The handling of sNaN is explicitly implementation-defined when 
FE_SNANS_ALWAYS_SIGNAL is not defined, so that example implementation 
should not be used to infer anything about how sNaN should be handled.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2019-12-10 18:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 17:12 Ulrich Weigand
2019-12-09 17:23 ` Joseph Myers
2019-12-09 17:39   ` Ulrich Weigand
2019-12-10  1:00     ` Joseph Myers
2019-12-10 10:44       ` Ulrich Weigand
2019-12-10 18:05         ` Joseph Myers [this message]
2019-12-10 18:39           ` Ulrich Weigand

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.1912101803360.4700@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=uweigand@de.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).