bugGNU Common Lisp - Bugs: bug #40154, GCL parses 1e-6 and 1e-7...

 
 

bug #40154: GCL parses 1e-6 and 1e-7 incorrectly in compiled code

Submitted by:  Robert Dodier <robert_dodier>
Submitted on:  Tue 01 Oct 2013 03:38:16 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.

 

Tue 19 Nov 2013 02:46:01 PM UTC, comment #1:

Thanks for your report! Should be fixed in 2.6.10.

Camm Maguire <camm>
Project Administrator
Tue 01 Oct 2013 03:38:16 AM UTC, original submission:

GCL 2.6.9 ANSI on Linux incorrectly parses floating point literals 1e-6 and 1e-7 incorrectly, but only in compiled code; interpreted code is OK. Similar literals (see example program below) are parsed correctly.

Example:

-------- begin foo.lisp ---------
(defvar foo
'(-2e9 -2e8 -2e7 -2e6 -2e5 -2e4 -2e3 -2e2 -2e1 -2e0 -2e-1 -2e-2 -2e-3 -2e-4 -2e-5 -2e-6 -2e-7 -2e-8 -2e-9
-1e9 -1e8 -1e7 -1e6 -1e5 -1e4 -1e3 -1e2 -1e1 -1e0 -1e-1 -1e-2 -1e-3 -1e-4 -1e-5 -1e-6 -1e-7 -1e-8 -1e-9
1e9 1e8 1e7 1e6 1e5 1e4 1e3 1e2 1e1 1e0 1e-1 1e-2 1e-3 1e-4 1e-5 1e-6 1e-7 1e-8 1e-9
2e9 2e8 2e7 2e6 2e5 2e4 2e3 2e2 2e1 2e0 2e-1 2e-2 2e-3 2e-4 2e-5 2e-6 2e-7 2e-8 2e-9))
--------- end foo.lisp -----------

Session:

$ gcl
GCL (GNU Common Lisp) 2.6.9 ANSI Sep 1 2013 17:56:48
Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
Binary License: GPL due to GPL'ed components: (XGCL UNEXEC)
Modifications of this banner must retain notice of a compatible license
Dedicated to the memory of W. Schelter

Use (help) to get some basic information on how to use GCL.
Temporary directory for compiler files set to /tmp/

>(compile-file "/home/robert/tmp/foo.lisp")


Compiling /home/robert/tmp/foo.lisp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
Finished compiling /home/robert/tmp/foo.lisp.
#p"/home/robert/tmp/foo.o"

>(load *)


Loading /home/robert/tmp/foo.o
start address -T 0x98f388 Finished loading /home/robert/tmp/foo.o
87

>(mapcar #'(lambda (x) (eq x 0.0)) foo)


(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL T T NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL
NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)

>


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
    Tue 19 Nov 2013 02:46:01 PM UTCcammStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup