Hi Nicolas,
regarding rounding Fractions:
i use fractions if i want to get an exact result (eg for comparing
the result with Float calculations). if #round: returns a Float
all further calcs (with Fractions) will get contaminated, since
the rest will become Floats too. Hence the "asScaledDecimal:
numberOfWishedDecimal" seems better to me, but i wonder why these
transformations at the end are necessary at all? just for the
looks? i'd suppose every person, who knows how to use Fractions,
also knows how to append a #asScaledDecimal: to a result by
himself, should he want that.
taking as an example financial calcs that first use 2 decimals.
occasionaly the final result will be basepoints, often small ones
like 0.003. with scaledDecimals the result would be (ok, look
like) 0 since scaledDecimals also contaminate the calc. of course
one could correct this simply with an #asScaledDecimal:3 at the
end. nevertheless a first look at the zero result would surprise
me for a tenth of a second.
werner
On 10/26/2016 09:58 AM, Nicolas Cellier wrote: