If memory serves me correctly, x**y is defined for all of the (x,y) plane except at the origin, where it has an
essential singularity. Similarly, memory wise, a defining characteristic of an essential singularity is that the
function can and does take every possible value in any neighbourhood however small that contains the point of
singularity. Therefore by defining special conditions whereby the path to the essential singularity is constrained you
can legitimately obtain absolutely any value you like. It would seem to me that the standard being somewhat quiet on the
subject is sensible and if any definition was provided Nan is probably the best. An essential singularity is one of
those points in mathematics where a programmer probably should be required make specific choices for him/her self and
not rely on the necessarily idiosyncratic, and probably wrong in many cases, choice of a standards committee.
--
Lawrie Schonfelder
Wirral, UK
> -----Original Message-----
> From: Fortran 90 List [mailto:[log in to unmask]]On Behalf
> Of W.J. Metzger
> Sent: 13 July 2006 13:39
> To: [log in to unmask]
> Subject: Re: Exponentiation in border cases
>
>
> On Thu, 13 Jul 2006, Kurt Hirchert wrote:
>
> >
> > I think that your "definition" of integer exponentiation is not one I would
> > call typical mathematical convention. If I start with what I would think of
> > as a proper mathematical definition of integer exponentiation, I find the NaN
> > result to be both plausible and, arguably, the "right" result.
> >
> > My idea of a "proper" mathematical definition of integer exponentiation:
> > A1) x**1 = x for all x
> > A2) x**(n+1) = x**n*x for all x and for all n in the set of natural numbers
>
> which you then point out leads to 0**0 being undefined.
> That suggests to me that your "proper" mathematical definition is
> incomplete and needs in addition
>
> A3) 0**0 = 1
>
> although, as others have pointed out you can do anything you want in
> mathematics so long as it is consistent. So you can leave it undefined
> if you want.
>
>
> This discussion reminds me of one on this list some months ago concerning
> the PROD function, namely what it should return if the argument is a zero
> length array. You can view x**n as
> Function x2n(x,n)
> Dimension y(abs(n))
> y(:) = x
> x2n = PROD(y)
> If (n < 0) x2n = 1./x2n
> End
> For n=0 PROD returns 1
> So I conclude that to be consistent within Fortran 0**0 should be 1.
>
> Well, that's my 2 cents.
>
> Cheers, Wes
>
> --
> Dr. W. J. Metzger Experimental High Energy Physics Group
> tel. +31-24-3653127 Faculty of Science
> +31-24-3652099 (secr.) Radboud University Nijmegen
> fax. +31-24-3652191 Toernooiveld 1
> 6525 ED Nijmegen, The Netherlands
> e-mail: [log in to unmask] or [log in to unmask]
> http://home.cern.ch/metzger/ or http://www.hef.ru.nl/~wes
>
|