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
121 stars 44 forks source link

Decimal.slog always return NaN #109

Closed 1e1000000 closed 2 years ago

1e1000000 commented 2 years ago

It should be return 0 for below example:

image

and It should be 1:

image

Patashu commented 2 years ago

It's possible I broke tetrate and slog for small values, I'll check it today

1e1000000 commented 2 years ago

It also happen on large number, Decimal.slog("eeeee10",10) return NaN instead of 6

Patashu commented 2 years ago

pushed what I think is a fix (it was predictably dumb), but going to hold off on closing the issue until I test other things, I want to make some better unit tests for myself

Patashu commented 2 years ago

Ok, I am dumb, I made many problems for myself, it should be fixed now

1e1000000 commented 2 years ago

It return 0,1,6 for above examples as it supposed to be.

Patashu commented 2 years ago

Great, thanks for reporting quickly!