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

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

John Cowan <cowan@mercury.ccil.org> writes:
> Or is what you mean that some Schemes, when asked for the imag-part of
> 2.0, may return 0.0 rather than 0?

Yes, that's exactly what I mean.  I know that SCM and Gauche do this,
and I suspect it's quite common.

> I can check for that possibility when I'm back home.
>
>> Another test that would be worthwhile is this:
>>
>>   (list (eqv? +0.0 -0.0)
>>         (eqv? (make-rectangular +0.0  1.0)
>>               (make-rectangular -0.0  1.0))
>>         (eqv? (make-rectangular  1.0 +0.0)
>>               (make-rectangular  1.0 -0.0))
>>
>> I wouldn't be surprised if some Schemes distinguish signed zeroes in the
>> real part but not in the imaginary part.  If an implementation discards
>> inexact zero imaginary parts, then it probably discards the sign as well
>> as the exactness.
>
> I'll try that.

Thanks!

    Mark

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