Menu

#456 (format nil "~8e" .999999d0) wrong

lisp error
closed-fixed
clisp (524)
5
2008-04-30
2008-03-29
Raymond Toy
No

(format nil "~8e" .999999d0) -> " 10.0d-1"

I think that should be " 1.0d+0" instead, as produced by CMUCL.

Most likely this is caused by an oversight. The number has exponent -1, but the printed, rounded result has exponent 0, and this change isn't accounted for.

Discussion

  • Sam Steingold

    Sam Steingold - 2008-04-01

    Logged In: YES
    user_id=5735
    Originator: NO

    I agree that "1.0d+0" looks much better, but both cmucl 5.fc8 (19D) and SBCL 1.0.1
    return " 10.d-1" which is no better.

     
  • Raymond Toy

    Raymond Toy - 2008-04-01

    Logged In: YES
    user_id=28849
    Originator: YES

    CMUCL 19e will have this fixed.

     
  • Sam Steingold

    Sam Steingold - 2008-04-30

    Logged In: YES
    user_id=5735
    Originator: NO

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2008-04-30
    • labels: --> clisp
    • milestone: --> lisp error
    • assigned_to: nobody --> sds
    • status: open --> closed-fixed
     

Log in to post a comment.