FWIW... VW has two choices... a) fail the primitives when the answer is 
INF or NaN, or b) return whatever the FPU says.  Also, NaN and INF are 
regular instances of Float and Double...

Reinout Heeck wrote:
> On Jul 8, 2009, at 12:53 PM, Andres Valloud wrote:
>
>   
>> Well, but on the other hand, what happens when you do things like
>> 1.0 +
>> NaN or NaN + 1.0?  It should work...
>>     
>
> It will break further down the line though:
>
> (1.0 + NaN) < (1.0 + NaN)
>
> should that return NaB (not a Boolean)?
>
>
> Shouldn't obtaining NaN from arithmetic be modeled as a resumable
> exception, so the calling code can decide what kind of object to
> return as the value? (Instead of only one choice being hardwired in
> the system).
>
>
>
> R
> -
>
>
>   

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to