# sqrt(-1)

• To: fateman @ UCBKIM
• Subject: sqrt(-1)
• From: Alan Bawden <ALAN @ MIT-MC>
• Date: Mon, 06 Jun 1983 19:02:00 -0000
• Cc: Common-Lisp @ SU-AI

```    Date: 6 Jun 83 10:23:57 PDT (Mon)
From: fateman%UCBKIM at Berkeley (Richard Fateman)
Let us say you are free to choose a different form for the answer,
depending on the value.  That is what Alan Bawden says.

I did not propose anything different from what is already done with
bignums.  Certain potential bignums are illegal because they can be
represented with fixnums.  Similarly certain potential rationals are to be
illegal because they are not in lowest terms, the denominator is negative,
or they can be represented with fixnums or bignums.  Finally certain
potential Gaussian rationals are to be disallowed because they can be
represented using rationals, bignums or fixnums.

Well, how about having the exponential function choose a different float
format if the exponent would otherwise underflow or overflow?

I proposed nothing resembling this.  Neither did anybody else as far as I
can see.  If someone has an argument in favor of it, they should speak up,
otherwise I suggest we dismiss the idea as a strawman you devised to give
yourself something to argue against.

Do you really know the cost of not knowing that sqrt(float) is a float?

Is add1(fixnum) a fixnum?  Sqrt(float) is a float for positive arguments
and is a (complex float) for negative arguments.  Or it will be if we so
vote.

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?  This is Lisp, what does it mean to "expect" a real?
(SQRT -1) => #C(0 1), today and tomorrow.

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