Re: 1e-4 printing bug

Derek Zhou <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>

On April 18, 2019 9:40:41 PM GMT+08:00, Thomas Worthington <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.