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

Issue: EXPT-ZERO-ZERO (Version 1)



For what it is worth, W. Kahan of Berkeley recommends that
(expt 0.0 0) => 1.0  but  (expt 0.0 0.0) => error.

I believe that the rationale is that in the case of an underflow,
(expt 0.0 0) => 1  saves you when what you were trying to do was
raise some very tiny but non-zero number to an integer power that
turned out to be zero (as in evaluating a polynomial?).

However, in the case of (expt x 0.0) the case is much less clear,
and if underflow is involved in the exponent there is more likely
to be some nuemrical instability.

I realize that this is a bit of a handwave, and I have probably
exceeded the limits of my own competence.

To summarize: yes, there is an essential singularity in the expt
function at (0, 0), but it is nevertheless convenient to define
the result to be 1, at least when the exponent is a rational zero.
--Guy