From: Stefan v. d. W. <st...@su...> - 2006-10-12 16:15:15
|
On Thu, Oct 12, 2006 at 10:53:12AM -0400, Alan G Isaac wrote: > On Thu, 12 Oct 2006, Stefan van der Walt apparently wrote:=20 > > I tried to explain the argument at=20 > > http://www.scipy.org/NegativeSquareRoot=20 >=20 > Helpful. But you start off by saying: > In mathematics, the above assumption is true -- that=20 > the square root of -1 is 1j. >=20 > Since square root is (here) a function, and part of the=20 > function definition is the domain and codomain, this=20 > statement is not correct. If the codomain is real numbers,=20 > the domain must correspondingly be (a subset of) the=20 > nonnegative reals. The nan output is the result of an=20 > **invalid** input. >=20 > So the question is really: "Why is a negative real number an=20 > invalid input in this implementation", or "Why in this=20 > implementation is the type of the output restricted by the=20 > type of the input?" You get a good start on answering that. You are more than welcome to change the wiki if you can think of a simpler way to explain the problem... In fact, I would encourage that -- I just put it there as a starting point. Cheers St=E9fan |