Hi Martin,
of course you are right, but i find it irritating and difficult to remember, if i can calculate something with one kind of number and not with next one, especially Floats & Fractions. imo they should behave similarly, that makes them easier to use for simple minds like me, for example if i compare results with Floats & Fractions.
werner

On 10/27/2016 06:12 PM, Martin McClure wrote:
On 10/27/2016 04:12 AM, test wrote:
i would prefer if #round: will not be deprecated in Floats. in some cases Float>>#round: can be useful, eg optimization problems where one searched value describes the size of a screw, that exists only in certain sizes.

#roundTo: can be used for this (and is specified by ANSI Smalltalk, for those who care). If the screws only come in 16th inch increments, for instance, then "roundTo: 0.0625" will give you an exact result, since 16ths *are* exactly representable as floats.

OTOH, #round: (not in ANSI) appears to promise something that cannot be delivered for Floats, so is misleading, and it spreads the kind of confusion that resulted in this thread.

That's why I favor deprecating #round: for Floats.

Regards,

-Martin


Reply via email to