Patashu / break_eternity.js

A Javascript numerical library to represent numbers as large as 10^^1e308 and as small as 10^-10^^1e308. Sequel to break_infinity.js, designed for incremental games.
MIT License
120 stars 43 forks source link

`Decimal.lambertw("ee4992767175317001")` errors instead of returning a value #152

Closed James103 closed 3 months ago

James103 commented 1 year ago

When running the following:

Decimal.lambertw("ee4992767175317001")

break_eternity.js errors out with the following:

Uncaught Error: Iteration failed to converge: ee4992767175317001
    at d_lambertw (<anonymous>:391:11)
    at Decimal.lambertw (<anonymous>:2328:18)
    at Function.lambertw (<anonymous>:3035:25)
    at <anonymous>:1:9

This number is approximately ee4.993e15, and most other numbers around that range that high up work properly when run through Decimal.lambertw. However, around 1.8% of representable numbers between ee4.5e15 and ee9e15 fail lambertw with the same or a similar error (according to a random sampling of 1e6 numbers between ee1 and ee9e15).

MathCookie17 commented 6 months ago

Note: This is not resolved. I mentioned the issue in that pull request as an example of why I wanted to make ssqrt not rely on lambert-w; all I did was make lambert-w less used, I didn't fix it.

MathCookie17 commented 3 months ago

Okay, NOW this one's resolved.