[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Strong win later reversed: Real numbers have imaginary part #e0
John Cowan <cowan@x> writes:
> Mark H Weaver scripsit:
>
>> Several implementations that are not able to represent mixed exactness
>> in the general case are able to do so in one special case: when the
>> imaginary part is exact 0.
>
> I don't think the behavior of `imag-part` is a reliable indication of this.
> It may be simply that it returns 0 when the argument is a flonum.
There are several other ways of checking for this, such as:
(eqv? 1.0+0.0i 1.0+0i)
and
(eqv? (make-rectangular 1.0 0.0)
(make-rectangular 1.0 0))
For the three implementations I mentioned (Guile 2, Racket, and Ikarus)
the expressions above return #f.
Mark
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports