Naruyoko / OmegaNum.js

A huge number library holding up to 10{1000}9e15. A basement for planned {10,x,1,2}.
https://naruyoko.github.io/OmegaNum.js/index.html
MIT License
33 stars 15 forks source link

Error when passing a string to OmegaNum that exceeds 1000 arrows (OmegaNum.maxArrow default) #39

Closed sonic3XE closed 4 months ago

sonic3XE commented 5 months ago

This evaluation doesn't warn and/or give Infinity because of the error occurred before the evaluation is complete.

OmegaNum("10{1000}10")
OmegaNum.js:1256 Uncaught TypeError: arrows.add is not a function
    at Q.fromString (OmegaNum.js:1256:87)
    at new OmegaNum (OmegaNum.js:1465:23)
    at OmegaNum (OmegaNum.js:1445:44)
    at <anonymous>:1:1

Other methods work fine as since

OmegaNum.arrow(10,1000,10).eq(Infinity)
OmegaNum.js:877 Number too large to reasonably handle it: tried to 1002-ate.
(anonymous) @ OmegaNum.js:877
Q.arrow @ OmegaNum.js:919
(anonymous) @ VM323:1
true
Naruyoko commented 4 months ago

Fix released in 0.7.0

sonic3XE commented 4 months ago

This is confirmed that v0.7.0 fixed this issue. (shows warning and gives infinity) image