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

Submitter:  Robert Dodier <robert_dodier>
Submitted:  Tue 01 Oct 2013 03:38:16 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

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

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code