On 10/31/2016 02:49 PM, John Brant wrote:
>> On Oct 31, 2016, at 3:58 PM, Martin McClure <[email protected]> wrote:
>>
>> (1.19 roundTo: (1/10))asFloat
>>
>> I should note that the final example *should* result in a Float without
>> having to have #asFloat sent to it. Per ANSI and traditional Smalltalk
>> practice, any operation where the receiver *or* the argument is a Float
>> produces a Float.
> 
> While ANSI says that the numbers should be converted using the default 
> conversion table, all of the Smalltalk’s that I’ve tried don’t follow that. 
> I’ve tried Dolphin, VW, Pharo, & VAST, and all return fractions. I prefer 
> this behavior over the ANSI behavior.
> 

Thanks for the information. GemStone answers a Float.
Since Fractions are more general than Floats, there is indeed a good
basis for arguing that this is one of the things that ANSI got wrong.

Regards,

-Martin


Reply via email to