public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Fabian Schriever <fabian.schriever@gtd-gmbh.de>
Cc: Keith Packard <keithp@keithp.com>, <newlib@sourceware.org>
Subject: Re: [PATCH] Fix truncf for sNaN input
Date: Tue, 17 Mar 2020 22:29:30 +0000	[thread overview]
Message-ID: <alpine.DEB.2.21.2003172225470.20204@digraph.polyomino.org.uk> (raw)
In-Reply-To: <794619dc-3dc7-9391-10bd-0ce5eaa4f19b@gtd-gmbh.de>

On Tue, 17 Mar 2020, Fabian Schriever wrote:

> On implementations that support the IEC60559: 1989 standard floating point,
> functions with signaling NaN argument(s) shall be treated as if the function
> were called with an argument that is a required domain error and shall return
> a quiet NaN result, except where stated otherwise.

This fails to allow for functions such as fabs where the corresponding 
IEEE operations pass through a signaling NaN rather than returning a quiet 
NaN with "invalid" raised.

Furthermore, TS 18661-1 makes it implementation-defined whether there is a 
domain error.  And in practice it's more convenient for implementations 
not to treat it as a domain error (not to set errno) as that means they 
can just e.g. add a NaN argument to itself rather than rather than 
explicitly testing for a signaling NaN.

-- 
Joseph S. Myers
joseph@codesourcery.com

      parent reply	other threads:[~2020-03-17 22:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  9:58 Fabian Schriever
2020-03-11 11:13 ` Corinna Vinschen
2020-03-11 20:48 ` Keith Packard
2020-03-11 21:47   ` Joseph Myers
2020-03-11 22:41     ` Keith Packard
2020-03-11 23:14       ` Joseph Myers
2020-03-16 19:50         ` Keith Packard
2020-03-17  1:30           ` Joseph Myers
2020-03-17  4:04             ` Keith Packard
2020-03-17 22:24               ` Joseph Myers
2020-03-17 15:26             ` Fabian Schriever
2020-03-17 19:34               ` Brian Inglis
2020-03-17 22:29               ` 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.2003172225470.20204@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=fabian.schriever@gtd-gmbh.de \
    --cc=keithp@keithp.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).