On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz <mor...@faui2k3.org> wrote: > > > What's the 0th root of a number, then? > It would be a number $y for which $y ** 0 == $x, which can only be > fulfilled for $x == 1. So in the general cases the answer to the > question root($x, 0) is nonsense, which is best mapped to NaN. >
That doesn't make sense. The answer is 1, not NaN. Think about it for a while: mathematically speaking, we would expect the 0th root of a number to be 1. By enforcing NaN for a list of roots, math code suddenly has to include a set of extraneous tests in order to coerce the result to a list of ones. And that _is_ nonsensical. -- Jan