www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2018/01/08/14:17:34

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD
autolearn=disabled version=3.3.2
Date: Mon, 08 Jan 2018 21:17:13 +0200
Message-Id: <83lgh86tza.fsf@gnu.org>
From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <279ab41f-d898-4bcf-b5d4-ad9bf86e7a06@googlegroups.com>
(djgpp AT delorie DOT com)
Subject: Re: Fixing various bugs in frexp.S
References: <5A4946EB DOT 3090500 AT gmx DOT de> <p2vmp0$14s4$1 AT gioia DOT aioe DOT org> <279ab41f-d898-4bcf-b5d4-ad9bf86e7a06 AT googlegroups DOT com>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 8 Jan 2018 10:27:20 -0800 (PST)
> From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
> 
> > >   - for NaN and infinity arguments no sign checks are done thus the
> > >     results are always positive
> > 
> > > All these issues are serious deviations from the ansi/posix behavior.
> > 
> > An NaN is a NaN. It has no positive or negative value. It has no value at
> > all. I seriously doubt ansi/posix says anything about signedness of NaNs.
> 
> The goal is not to generate a negative NaN but to preserve the sign of the
> imput argument.  The implementation should no convert a -NaN in a +NaN IMO.
> This way the implementation bahaves as the implementation on my linux box.

I agree with Martin that the sign of a NaN is meaningless: you cannot
detect that sign by comparing a NaN with zero, for example.

Does glibc give any explanation (in its sources, for example) for
this behavior?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019