jscl icon indicating copy to clipboard operation
jscl copied to clipboard

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

Open hemml opened this issue 2 years ago • 2 comments

CL-USER> (type-of 1.2)
FLOAT
CL-USER> (type-of 1.2e10)
INTEGER
CL-USER> (type-of 1.2d10)
INTEGER

hemml avatar Oct 17 '23 16:10 hemml

integerp and floatp are also wrong:

CL-USER> (integerp 1.2e1)
T
CL-USER> (floatp 1.2e1)
NIL

hemml avatar Oct 17 '23 16:10 hemml

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.

davazp avatar Oct 18 '23 09:10 davazp