X-Spam-Check-By: sourceware.org
X-YMail-OSG: yTaIz5gVM1kNuJ2qZexK6GEnBow57dyULfbjAk5DsnFQve7okz7kp2uEfdaNEPUxWeTo2WfzIg--
Message-ID: <4628163D.2080407@aol.com>
Date: Thu, 19 Apr 2007 18:24:13 -0700
From: Tim Prince <n8tm@aol.com>
Reply-To: tprince@computer.org
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: <OT> newlib: pow function can produce incorrect results.
References: <392691.10784.qm@web59113.mail.re1.yahoo.com>
In-Reply-To: <392691.10784.qm@web59113.mail.re1.yahoo.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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

cygcary@yahoo.com wrote:
> I do agree that
> -1.0 to either +-infinity should be a nan, but then
> using that same logic why is -1.1 to infinity and 0.9
> to minus infinity equal to infinity and not nan?
> Personally I don't really care which way it's done. I
> just would like things to be consistent.

pow() since the very beginning treats negative integral values different 
from other negative values, so you can't make them totally consistent. 
Maybe you should stick to Fortran or BASIC.
pow(0.9, -Inf) clearly must produce Inf, same as 1/pow(0.9, Inf).
pow(-1.1, Inf) should be NaN, but again, newlib doesn't generally go 
beyond minimum C90 support.  As newlib doesn't go very far in the 
direction of C99 or IEEE754 support, it is out of the realm of cygwin.

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

