www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/09/07:33:33

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Wed, 9 Jun 1999 13:32:45 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
cc: rudd AT cyberoptics DOT com
Subject: Re: libm sources from cyberoptics
In-Reply-To: <199906090818.KAA09460@mars.lu.erisoft.se>
Message-ID: <Pine.LNX.3.93.990609130615.26954A-100000@acp3bf>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id HAA21922
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 9 Jun 1999, Martin Stromberg wrote:

> Eric said:
> 
> > In particular, though the prevailing consensus is that 0^0 should be defined
> > as 1, my decision to raise EDOM for pow(0., 0.) was based on the fact that
> > it is mathematically-indeterminate.
> 
> Well, as lim(x^0) = 1, in one way it does make sense to define 0^0 = 1,
>          x->0+

BUT: with exactly as much relevance, I could claim:

	as lim(0^x) = 0, in one way it does make sense to define 0^0 = 0

Actually, from a mathematical point of view, it's even worse than that: 
you can't just get two different results. You can get *every* result you
want. This is because, effectively x^y for non-integer x and y is
equivalent to exp(y * log(x)). By using the continuity of exp and log,
you get:

	lim(x->0, y->0, exp(y * log(x)))
	= exp( lim(x->0, y->0, y * log(x))       (z := log(x))
	= exp( lim(z->-infinity, y->0, y * z)
	"=" exp ( - 0 * infinity)

Now, zero times infinity is completely undefined, obviously. Its value is
totally dependant on *how*, exactly, y and z make their ways to zero and
-infinity (which can easily be seen from the Bernoulli-l'Hospital
theorem). Therefore, this limit cannot possibly exist, and 0^0 cannot
be given any single, well-defined value. 

It is, however, rather often defined to be 1.0, by mathematicians,
whenever it suits their particular needs. 

But on looking a bit deeper into the draft standard for C9x (not
'the law' yet, but it's going to be), I find in Annex F.9.4.4:

       F.9.4.4  The pow functions

       [#1]

         -- pow(x, ±0) returns 1 for any x, even a NaN.

Unlike some other Annexes, this one is 'normative', not just 'informative'
stuff. This implies that pow(0,0)==1, by word of the (coming) standard. 

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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