[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Definition of expt when the base is exact 0 (was Re: John Cowan's votes and rationales on the seventh ballot)



On 09/19/2012 03:32 AM, Alex Shinn wrote:
> Please read at least the wikipedia article on exponentiation.

Okay, I just read it.

> Rational exponents are defined in terms of roots.  Real exponents
> are defined in terms of limits using rational exponents.

The wikipedia article states that those definitions are valid only when 
the base is a positive real number.  Furthermore, they can be used only 
for real exponents.  They are no help at all in determining a value for 
(expt 0 1.3+1.4i).

> Complex
> exponents are defined in terms of real exponents using the
> formula I gave.

Again, the formula you gave cannot be used to define (expt 0 z) because 
the formula involves log(r) where 'r' is the magnitude of the base.  In 
this case, the magnitude of the base is exact 0, therefore log(r) is 
undefined.  Furthermore, the formula depends on 'theta', the angle of 
the base, which is not defined for exact 0.

See the "Zero to the power of zero" section of that article.  It admits 
that (expt <zero> <zero>) => 1 only when the exponent is discrete, in 
other words (in the language of Scheme) when the exponent is exact 0. 
In other cases it states that (expt <zero> <zero>) must be handled as an 
indeterminate form.

In "Branch Cuts for Elementary Functions", Kahan argues that
(expt 0.0 0.0) => 1.0 as follows:

    Consider two expressions z := z(Xi) and w := w(Xi) that depend on
    some variable Xi, and suppose that z(Beta) = w(Beta) = 0 and that
    z and w are analytic functions of Xi in some open neighbourhood of
    Xi = Beta.  This means that z(Xi) and w(Xi) can be expanded in
    Taylor series in powers of Xi-Beta valid near Xi = Beta, and both
    series begin with positive powers of Xi-Beta.  Then we find that
    z -> 0 and w -> 0 and z^w = exp(w ln(z)) -> 1 as Xi -> Beta
    regardless of the branch chosen for ln.  Since this phenomenon
    occurs for /all/ pairs of analytic expressions 'z' and 'w', it is
    very common.

and I accept this rationale for (expt 0.0 0.0) => 1.0.

However, Kahan did not consider a system involving exact numbers, and 
the reasoning above does not apply for (expt 0 0.0).  In that case, the 
Taylor series for z does _not_ begin with a positive power of Xi-Beta. 
Although Kahan does not explicitly mention this case, his reasoning 
above implicitly assumes that z is not zero everywhere.

To evaluate (expt 0 0.0) using limits using the traditional method, we 
should evaluate the limit of (expt 0 x) as 'x' approaches zero from 
above.  However, we cannot evaluate this limit using either of the two 
usual definitions of exponentiation which Kahan considers.

Suppose, for the sake of argument, that we admit that (expt 0 x) => zero 
for arbitrary positive real 'x'.  In that case, (expt 0 0.0) =>
(limit of (expt 0 x) as 'x' approaches zero from above) => 0.0.

In summary, I've still seen no justification for the claims that
(= 1 (expt 0 0.0)) and (expt 0 z) => zero for arbitrary complex 'z' with 
positive real part.

    Regards,
      Mark

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports