[Ecls-list] strange things with declarations, ECL 9.6.2

Gábor Balázs gabalz at gmail.com
Thu Jul 9 16:17:54 UTC 2009


Hello,

I try to create a fast double encoder/decoder function for ECL like SBCL's
double-float-high-bits, double-float-low-bits and make-double-float. I want
to do it, because I want to support ECL by my
library<http://sites.google.com/a/rl-community.org/rl-glue/Home/Extensions/lisp-codec>.
But I experienced very strange things with using type declarations. I
attached my test code.

Results:

With '(optimize (speed 3) (safety 2) (debug 0))
endian: 1
---------- 1 ----------
5.6d0 =?= 5.6d0
-5.6d0 : error 3222693478 is not of type FIXNUM.
7.641415267766224d307 : error 3074424831 is not of type FIXNUM.
-7.641415267766224d307 : error 4292555855 is not of type FIXNUM.
---------- 2 ----------
5.6d0 =?= 5.6d0
-5.6d0 =?= -5.6d0
7.641415267766224d307 =?= 7.641415267766224d307
-7.641415267766224d307 =?= -7.641415267766224d307

With (optimize (speed 3) (safety 0) (debug 0))
endian: 1
---------- 1 ----------
5.6d0 =?= 7.771840340661374d-298
-5.6d0 =?= 7.771782011685204d-298
7.641415267766224d307 =?= 7.771723682709034d-298
-7.641415267766224d307 =?= 7.771665353732864d-298
---------- 2 ----------
5.6d0 =?= 7.77160702475668d-298
-5.6d0 =?= 7.771052899483105d-298
7.641415267766224d307 =?= 7.771023734994973d-298
-7.641415267766224d307 =?= -7.641412237423105d307

Versions:
ECL (Embeddable Common-Lisp) 9.6.2 (I tried it with 9.6.1 as well, same
results)
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Linux udyo 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009
i686 GNU/Linux
My computer is a 32bit architecture.

Any ideas, recommendations?

Thanks,
`Gabor`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090709/b01b5774/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tryme.lisp
Type: application/octet-stream
Size: 4088 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090709/b01b5774/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tryme.asd
Type: application/octet-stream
Size: 68 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090709/b01b5774/attachment-0001.obj>


More information about the ecl-devel mailing list