# Fwd: [R6RS] Preparation for next meeting

Marc Feeley feeley
Thu May 19 19:01:42 EDT 2005

```Sorry, this too was not sent to the list...

Marc

Begin forwarded message:

> From: Marc Feeley <feeley at iro.umontreal.ca>
> Date: May 19, 2005 7:31:58 AM EDT
> To: dyb at cs.indiana.edu
> Subject: Re: [R6RS] Preparation for next meeting
>
> On 19-May-05, at 12:48 AM, dyb at cs.indiana.edu wrote:
>
>> Will,
>>
>> As you're considering both the numeric stuff and eqv? / equal?, please
>> think about what the following (and similar) should evaluate to.
>>
>>    (eqv? 0.0 -0.0)
>
> I agree that eqv? (and equal?) should distinguish -0.0 and +0.0
> because, as you point out, they behave differently on some operations.
>  However, they should be = (for consistency with numeric equality in
> IEEE754), so
>
> (eqv? +0.0 +0.0) => #t
> (eqv? +0.0 -0.0) => #f
> (equal? +0.0 -0.0) => #f
> (= +0.0 -0.0) => #t
>
>>    (eqv? 1.0-0.0i 1.0+0.0i)
>>    (eqv? 1.0 1.0+0.0i)
>>    (eqv? 1.0 1.0-0.0i)
>>
>
> I agree that these should all evaluate to #f, but evaluate to #t when
> eqv? is replaced by = (because 0, +0.0, and -0.0 are all =).
>
>>    (/ (imag-part (- 1.0))) ;=> +inf.0
>>    (/ (imag-part (- 1.0+0.0i))) ;=> -inf.0
>>
>
> To me a real is a complex number with an exact 0 imaginary part.  So
> the previous expressions should result in a divide-by-zero error.  A
> complex number with an inexact imaginary part, even +0.0 or -0.0,
> should not be real?, i.e.
>
> (real? 1.0+0.0i) => #f
> (real? 1.0-0.0i) => #f
> (real? 1.0+0i) => #t
>
> Marc

```