Fix what appears to have been a thinko in the rounding of
authorChris Hanson <org/chris-hanson/cph>
Wed, 12 Feb 1997 08:00:19 +0000 (08:00 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 12 Feb 1997 08:00:19 +0000 (08:00 +0000)
commit4c18c14388c7c274feb45c8a949898418c2a7c34
tree180511c8e1fb6474ad15bcf06b84cc2ebc89e595
parent000d85cdecfb9c2bc870ee3a3982505bf6c627f2
Fix what appears to have been a thinko in the rounding of
floating-point printed representations.  This fix prevents the code
from diverging with certain combinations of numbers and rounding
modes.  An example that caused this problem:

(set! flonum-unparser-cutoff '(relative 4))
(/ (* 10e3 100e-15))

I'm not entirely convinced I understand the problem at this point; I
don't have a copy of the paper at hand to remind me how the printer
algorithm works.  But the change fixes the bug, seems to work
correctly on other test cases, and matches what my partial
understanding says should be happening.
v7/src/runtime/dragon4.scm