Fix another bug in the Dragon4 code (the bug exists in the original
authorChris Hanson <org/chris-hanson/cph>
Sat, 26 Jul 1997 07:14:37 +0000 (07:14 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 26 Jul 1997 07:14:37 +0000 (07:14 +0000)
commit56e885ade71cd3c71c9a167d2940388ac3428e39
treebba2cccdf66804097e6482f09a472857b11cb116
parentdb2f8bbe65c6cd12d50d38df8fed2e6b2b59bc04
Fix another bug in the Dragon4 code (the bug exists in the original
paper).  The bug caused the following behavior:

    (fluid-let ((flonum-unparser-cutoff '(absolute 2 normal)))
      (number->string 0.005))
    ;Value 3: ".01"

    (fluid-let ((flonum-unparser-cutoff '(absolute 2 normal)))
      (number->string 0.00499))
    ;Value 4: ".005"

The problem is that in the second case the trailing digit "5" should
not be generated.  The fix works by preventing any digits being output
by the digit-generation loop when the first digit to be output would
be to the right of the cutoff point.
v7/src/runtime/dragon4.scm