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

x.pow(y) ignore x's sign when y is non-integer #43

Closed 1e1000000 closed 2 years ago

1e1000000 commented 3 years ago

Expected result: new Decimal(-9).pow(1.5).toString() "NaN" Actual result: new Decimal(-9).pow(1.5).toString() "27.000000000000004"

Patashu commented 2 years ago

funnily enough, this is a bug in break_infinity.js too