Re: [Scheme-reports] Strong win later reversed: Real numbers have imaginary part #e0 Mark H Weaver (21 Dec 2012 12:02 UTC)

Re: [Scheme-reports] Strong win later reversed: Real numbers have imaginary part #e0 Mark H Weaver 21 Dec 2012 12:02 UTC

leppie <xacc.ide@gmail.com> writes:
> IronScheme does not support mixed-exactness complex numbers.

Apparently it does when the imaginary part is exact zero.
If you doubt this, evaluate the following expression:

  (let ((x 2.0))
    (and (complex? x)
         (inexact? (real-part x))
         (exact?   (imag-part x))))

> From what I recall, make-rectangular deals with some of those cases,
> which again might need to be revisited for correctness.
>
> I only added support for -0.0 much later and I suspect +/-0.0 was
> treated as 'exact-zero?'

The results you reported for my tests indicate that you handle those
cases correctly.  The last three tests check for that.

    Regards,
      Mark

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports