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

ERROR: Function 'FLOAT' undefined #481

Open VitoVan opened 1 year ago

VitoVan commented 1 year ago
Welcome to JSCL (version 25e0341 built on 18 May 2023)

JSCL is a Common Lisp implementation on Javascript.
For more information, visit the project page at [GitHub](https://github.com/jscl-project/jscl).

CL-USER> (float (/ 2 3))
ERROR: Function 'FLOAT' undefined
CL-USER>
VitoVan commented 1 year ago

in SBCL:

* (/ 2 3)
2/3
*

in JSCL

Welcome to JSCL (version 25e0341 built on 18 May 2023)

JSCL is a Common Lisp implementation on Javascript.
For more information, visit the project page at [GitHub](https://github.com/jscl-project/jscl).

CL-USER> (/ 2 3)
0.6666666666666666
CL-USER>

it is already float, so...

I haven't double checked the spec.

VitoVan commented 1 year ago

related: https://github.com/jscl-project/jscl/issues/104

bigint on the way: https://github.com/jscl-project/jscl/pull/404

bignum on the way: https://github.com/jtobey/javascript-bignum