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
122 stars 46 forks source link

add mantissaExponent and variants for backwards compatibility #21

Closed Patashu closed 5 years ago

Patashu commented 5 years ago

should be very easy, just make sure to handle negative exponents correctly.

slightly harder would be to make mantissa/exponent setters that temporarily express the number in mantissa/exponent form, change the m/e and then recalculate mag (and throw an error if it's too large to be a meaningful operation)