bugGNU Common Lisp - Bugs: bug #20992, GCL parses double float incorrectly

 
 

bug #20992: GCL parses double float incorrectly

Submitted by:  Robert Dodier <robert_dodier>
Submitted on:  Fri 07 Sep 2007 01:46:42 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 21 Nov 2013 05:01:11 PM UTC, comment #2:

Thanks for your report! Fixed in latest release, 2.6.10.

Camm Maguire <camm>
Project Administrator
Tue 01 Oct 2013 03:31:03 AM UTC, comment #1:

Not observed in GCL 2.6.9 ANSI on Linux.

For the record, features =>

(:ANSI-CL :COMMON-LISP :COMPILER :NUMLIB :CLOS-CONDITIONS
:PCL-STRUCTURES :PORTABLE-COMMONLOOPS :PCL :TURBO-CLOSURE-ENV-SIZE
:TURBO-CLOSURE :SDEBUG :DEFPACKAGE :GNU-LD :XGCL :UNEXEC
:NATIVE-RELOC :TRUNCATE_USE_C :CLX-LITTLE-ENDIAN :BSD :GNU :LINUX
:I686 :SGC :IEEE-FLOATING-POINT :UNIX :GMP :GCL :AKCL :COMMON :KCL)

Robert Dodier <robert_dodier>
Fri 07 Sep 2007 01:46:42 AM UTC, original submission:

GCL parses 4.6e8 incorrectly as the same as 4.6 * 1e8, when it should be the same as 46e7. 46e7 is an integer which can be represented exactly as a double float.

Without looking at the GCL source code, I'm guessing that 4.6e8 is parsed by parsing 4.6 and then parsing the exponent separately.

Some similar examples are parsed correctly, and some aren't.

(eql 4.5e8 45e7)
=> T (OK)

(eql 4.9e8 49e7)
=> NIL (OOPS)

Observed in GCL 2.6.7 on Windows and Linux. It might also be present in 2.6.8 on Windows, not sure about that.

There is some discussion about this in Maxima bug report # 1787111.
http://sourceforge.net/tracker/index.php?func=detail&aid=1787111&group_id=4933&atid=104933

Robert Dodier <robert_dodier>

 

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

Attach File(s):
   
   
Comment:
   

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)
  • -unavailable- added by robert_dodier (Submitted the item)
  •  

    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 05:01:11 PM UTCcammStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup