R6RS seems to require support for "mixed-exactness"
complex numbers.  I.e. numbers where the real part is exact
while the imaginary part of inexact or vice versa.
That is implied by these examples for real?:
   (real? -2.5+0.0i) ==> #f
   (real? -2.5+0i) ==> #t

I.e. -2.5+0i is equivalent to -2.5 and has an exact zero
imaginary part.

So logically a pure imaginary value has an exact zero real part.

So what does the square root of a negative real return?
Is the real part exact zero or inexact zero?  The examples
seem inconsistent:
   (sqrt -5) ==> 0.0+2.23606797749979i
i.e. with an inexact real part.  However:

   (sqrt -inf.0)  ==>  +inf.0i
i.e. with an exact real part.

It seems the following should yield the same answer:
   (exact? (real-part (sqrt -5)))
   (exact? (real-part (sqrt -inf.0)))
Logically, both should return #t, but R6RS implies #f
for the former and #t for the latter.
Is it (intended to be) implementation-dependent?

I didn't see this covered in the R6RS errata.
-- 
        --Per Bothner
p...@bothner.com   http://per.bothner.com/

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to