X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type; q=dns; s=default; b=DEwf1WbpJPiAbgN5
	G56em0193EnXVC4c96L690NsZWwacDD+f5O0eKVasgcV8cWOMnKt0swG7O/CJpxx
	Izi8dySfCDtZnVJSBJ+sLm/UCq0SNAvY2vgHVhbCcEI0y4mM8cTqzrf4sPueRdaa
	RJELAI6+d7odt8lmALkP8rbL8lc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type; s=default; bh=bfePPFHxzKKpDRstXeZL6h
	DJupI=; b=Bk4vAPiat/K3WrpOJHMcp8Q0WPgA3jvaRK6hGYBMHdSW/swpBiVBFl
	NHddsyfURYxWZT94PxXEOGStYrZQAjBNiWuybYK/Nl6Cy+kKlxft5FUo+hnpLh7T
	s+013KpWSpusON9BbNb/F+AJJkAjce4Eg2IJeYrOBUpiw8+kd150I=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=wherever, H*r:Unknown, international, International
X-HELO: blaine.gmane.org
To: cygwin@cygwin.com
From: Andy Moreton <andrewjmoreton@gmail.com>
Subject: Re: strtod ("nan") returns negative NaN
Date: Tue, 14 Aug 2018 22:08:41 +0100
Lines: 14
Message-ID: <8636vgac6e.fsf@gmail.com>
References: <20180814132301.GX3747@calimero.vinschen.de>	<5b730d82.1c69fb81.f063b.d706@mx.google.com>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)
X-IsSubscribed: yes

On Tue 14 Aug 2018, Steven Penny wrote:
> a number can be positive or negative. as "NaN" is by definition not a number,
> it cannot be positive or negative, it is simply itself, something anathema to
> a number.

The C standard disagrees with you [ISO:IEC 9899:2011, section 5.2.4.2.2]:

"An implementation may give zero and values that are not floating-point
numbers (such as infinities and NaNs) a sign or may leave them unsigned.
Wherever such values are unsigned, any requirement in this International
Standard to retrieve the sign shall produce an unspecified sign, and any
requirement to set the sign shall be ignored."

    AndyM


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

