[racket] Multiplying by 0

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Sun Feb 13 12:06:56 EST 2011

Exactness isn't about type promotion, though.  0.0 represents "close
to zero"; 0 represents "exactly zero".  If you multiply close to zero
by exactly zero, you get exactly zero.  If you add close to zero to
exactly zero, you get close to zero.

Carl Eastlund

2011/2/13 José Lopes <jose.lopes at ist.utl.pt>:
> I understand. However, not only that disregards type promotion but also is
> incoherent since (+ 0 0.0) evaluates to 0.0.
>
> On 13-02-2011 16:17, Robby Findler wrote:
>>
>> I believe one of the rules is that multiplying exact 0 by any number
>> gives you back exact 0.
>>
>> Robby
>>
>> 2011/2/13 José Lopes<jose.lopes at ist.utl.pt>:
>>>
>>> Shouldn't (* 0.0 0) evaluate to 0.0?
>>>
>>> --
>>> José António Branquinho de Oliveira Lopes
>>> 58612 - MEIC-A
>>> jose.lopes at ist.utl.pt



Posted on the users mailing list.