helpGNU Common Lisp - Support: sr #101603, numerical quirks


sr #101603: numerical quirks

Submitted by:  None
Submitted on:  Sat 07 Dec 2002 03:44:51 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  Done
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 21 Nov 2013 09:41:06 PM UTC, comment #2:

Thanks for your report! (setq si::*print-nans* t) prevents error on outputting a nan. The sqrt result is legal in common lisp, as there is no standard specification for the propagation of rounding errors. This might be improved someday (suggestions?), but for now I will close this.

Camm Maguire <camm>
Project Administrator
Fri 20 Feb 2004 04:34:02 AM UTC, comment #1:

Held over until version 2.7.0 as the correct way to deal with the problem is as yet undecided - see recent Maxima mailing list discussions.

Mike Thomas <mjthomas>
Project Member
Sat 07 Dec 2002 03:44:51 PM UTC, original submission:

This is actually a bug report, but your project seems
to have the bug tracking tool turned off, so I'll write
it here. Lisp is good at handling numbers. Accordingly,
gcl can handle arbitrarily large integers. Thus, (expt
2 (expt 2 (expt 2 (expt 2 2)))) works. However, if you
try subtracting 0.5 from it, gcl declares that the
result is a non-number. I can understand limited
floating-point precision, but its range should be
unbounded, especially when integers are handled so
well. Specifically, the internal variable in floats
indicating order of magnitude should use just these
unbounded integers.
Second of all, why is (sqrt -1)
#C(6.1230317691118863E-17 1.0)? I'm using gcl from
Debian sid, version 2.5.0.cvs20020625-70.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by camm (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-21 camm StatusNone => Done
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3