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

sqrt(-1)



Actually, I am tired of bringing this stuff up, but let me point out some
of the logical extensions.  Let us say you are free to choose a different
form for the answer, depending on the value.  That is what Alan Bawden says.
Well, how about having the exponential function choose a different float
format if the exponent would otherwise underflow or overflow?  How about
having  (pardon Maclisp syntax, which may in fact be wrong here)
(do ((i 10.0 (times 10 i)))nil (print i))  
print forever, starting with
small floats (with small exponents), going to bigger floats, and then,
in the interests of preserving mathematical properties like  (x*10)/10 = x,
going to bignum integers.

Do you really know the cost of not knowing that sqrt(float) is a float? 
If someone expects a real and gets 0+1*i, does it come out as 0?  In
which case is sqrt(-1) = 0 ? 

Are you serious about people using CL for arithmetic?  If so, I suggest
you find some people who are serious about using arithmetic, and have
thought about it more.