From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120127 invoked by alias); 14 Aug 2018 22:23:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 120118 invoked by uid 89); 14 Aug 2018 22:23:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=convincing, answering, H*M:1c69fb81, H*M:google X-HELO: mail-oi0-f48.google.com Received: from mail-oi0-f48.google.com (HELO mail-oi0-f48.google.com) (209.85.218.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Aug 2018 22:23:22 +0000 Received: by mail-oi0-f48.google.com with SMTP id v8-v6so36575680oie.5 for ; Tue, 14 Aug 2018 15:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:subject:to:references:user-agent; bh=xUsWP5+e0FPC6A7TYKMByHUOMx9+EZWH7PD5Ls852g8=; b=kez3bv6pMkJFZFzrFUODXAQskb9VFUGybViwhKF+D3e6j6rhDlGZ8S/wvveKe3bCjm YC6aZRlcZvuy0vtJNsnrATh5MnnSXYlALQfalodn4ZcsiUttQj11lInlY+CUNWDp6SGK ItUoAEb7catEeyQKKtylhsbOsXcgr+ixWNz5jw6HUD7nyXb0c4DNlJ7cLql9EAM7ERwm Gd8W2bDtnF73btVkBRSWsxbPQsfTgbqn35Sc3orhfSlqYzF4U3iZMvFzFtupEsdxi0TU OpePwCSGhXVSsG/Ui/d81atS4KYNjFO1yrKdZG44xf+ILFtHYAv30bHhs+YzRjqe27Fw Ru6Q== Return-Path: Received: from u9o (cpe-76-182-193-237.tx.res.rr.com. [76.182.193.237]) by smtp.gmail.com with ESMTPSA id x126-v6sm28313008oig.15.2018.08.14.15.23.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 15:23:20 -0700 (PDT) Message-ID: <5b735658.1c69fb81.d015e.1895@mx.google.com> Date: Wed, 15 Aug 2018 07:36:00 -0000 From: Steven Penny Subject: Re: strtod ("nan") returns negative NaN To: cygwin@cygwin.com References: <06e75f75-6a5f-2140-7557-849290225f79@redhat.com> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.8.0 (cup.github.io/tryst) X-SW-Source: 2018-08/txt/msg00196.txt.bz2 On Tue, 14 Aug 2018 16:44:59, Eric Blake wrote: > The remaining question is whether it should turn "-NaN" into > -NaN; and the argument that glibc JUST fixed their bug 23007 to make > strtod("-nan") return -NaN means that Cygwin should, indeed, preserve > the negative sign bit when parsing "-nan". > > https://sourceware.org/bugzilla/show_bug.cgi?id=23007 respectfully, no, it doesnt mean that. correct me, but Cygwin uses NewLib, not GlibC, so I would say the "NewLib Committee" or its analog would have the say on what should happen in this case. Ive made my view clear already that "NaN" should never exist with a negative. it would be equivalent to answering the question "what does blue smell like". it just doesnt make sense. and doing it just so that "strtod" matches "sscanf" seems like a solution going the wrong way - we should be fixing "sscanf" to stop emitting a negative rather than convincing "strtod" that it needs to start doing that. -- 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