X-Recipient: archive-cygwin AT delorie DOT 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:message-id:date:from:subject:to:references :content-type; q=dns; s=default; b=Y1JZtRt4YuBgxsvGwvkBoEY3q2cn5 08y2JiGMF5VOUEavva1FXcBk86oVCSk9JmVhPd1c/aGNRwPM3fFI/RRZjbeYY92f DEICrnCEe5amWHkx7E2FqNT0GdZpYWoGyty4UEgpCo/mmJ4Ddx6GnhzfDcy0amxG MuHV9Q6Za/nwTE= 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:message-id:date:from:subject:to:references :content-type; s=default; bh=6m30Mxah4RkLxf7bA2+hn4S//x8=; b=oOM SubFXDbDxfXOxJnwRI3C7ZcxYTxmOU0bqSpR3Ut7GwYRxMSAvS/JRgpisO2l4ZdA drRbvxurqNNI1nL8psH2xvntcO9tHVtfa+qSghfy6knbzXtL5B54wua0kErG2hEl O3ZGL27NScdMWjDWFXsbsdjpofKAW3bVQGfnoVyE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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== Message-ID: <5b735658.1c69fb81.d015e.1895@mx.google.com> Date: Tue, 14 Aug 2018 15:23:20 -0700 (PDT) From: Steven Penny Subject: Re: strtod ("nan") returns negative NaN To: cygwin AT cygwin DOT com References: <06e75f75-6a5f-2140-7557-849290225f79 AT redhat DOT com> Content-Type: text/plain; charset=utf8; format=flowed User-Agent: Tryst/2.8.0 (cup.github.io/tryst) 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