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: NonePriority: 5 - Normal
Severity: 2 - MinorStatus: Done
Privacy: PublicAssigned to: None
Originator Email: -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 File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Nov 2013 09:41:06 PM UTCcammStatusNone=>Done

    Back to the top

    Powered by Savane 3.1-cleanup1