[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: |
Mon, 01 Apr 2019 11:05:05 +0800 |
User-agent: |
mu4e 0.9.18; emacs 24.5.1 |
Thomas Worthington writes:
> Derek,
> The issue is an underlying one in how numbers are converted to exact
> fractions as part of the printing process; the problem needs to be addressed
> there since it will be affecting more than just printing.
I don't know why printing of float has to go through exact fraction, nor
why 1e-4 is converted to 13743895/137438953472 instead of 1/10000,
however 13743895/137438953472 is technically correct; while printing of
it is wrong. This patch fixed a bug so printing of 1e-4 through
13743895/137438953472 is correct again; which I think is a good
thing. Whether we should improve converting to exact fraction or skip
the convertion altogether is a seperate issue.
Derek