Re: 1e-4 printing bug

Derek Zhou <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
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
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.