[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] 1e-4 printing bug
From: |
Derek Zhou |
Subject: |
Re: [Help-smalltalk] 1e-4 printing bug |
Date: |
Thu, 18 Apr 2019 22:15:14 +0800 |
User-agent: |
K-9 Mail for Android |
On April 18, 2019 9:40:41 PM GMT+08:00, Thomas Worthington <address@hidden>
wrote:
>More strangeness:
>
>(10 raisedTo: -4) asExactFraction
>1/10000
>
correct; 10 raisedTo: -4 is a fraction, not a float. the asExactFraction is an
noop. no rounding was involved.
>(10 raisedTo: -4) asFloat
>0.0001
>
correct. the float value is actually not 0.0001, but something very close to
it. the printing method did some further rounding and gave you the illusion
that no precision was lost.
>1e-4
>0.00001
>
bug. which I proposed a fix previously.