jscl-project / jscl

A Lisp-to-JavaScript compiler bootstrapped from Common Lisp
https://jscl-project.github.io
GNU General Public License v3.0
876 stars 108 forks source link

(type-of float-with-exponent) returns 'INTEGER #489

Open hemml opened 8 months ago

hemml commented 8 months ago
CL-USER> (type-of 1.2)
FLOAT
CL-USER> (type-of 1.2e10)
INTEGER
CL-USER> (type-of 1.2d10)
INTEGER
hemml commented 8 months ago

integerp and floatp are also wrong:

CL-USER> (integerp 1.2e1)
T
CL-USER> (floatp 1.2e1)
NIL
davazp commented 8 months ago

Yes, this is a known limitation because in Javascript all numbers are floats.

Or they used to be, now support for bignums is common and it would be great to play again with them in JSCL.