[squeak-dev] The joys (or not) of floating point numbers
Louis LaBrunda
Lou at Keystone-Software.com
Tue Mar 26 17:41:21 UTC 2013
On Tue, 26 Mar 2013 18:32:31 +0100, Stéphane Rollandin
<lecteur at zogotounga.net> wrote:
>> Example (0.995 round: 2) -> 1.00 though 0.995 < (995/1000) so it
>> should round to 0.99.
>
>.. and I just noticed that
>
> 0.995 printShowingDecimalPlaces: 2 ==> '1.00'
>
>Do we have a method returning the correct value ?
That looks right to me, because 0.995 was rounded up.
Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
More information about the Squeak-dev
mailing list
|