MikeMcl / bignumber.js

A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
http://mikemcl.github.io/bignumber.js
MIT License
6.63k stars 743 forks source link

pow error #327

Closed windkind88 closed 2 years ago

windkind88 commented 2 years ago
x = new BigNumber(2);
z=x.pow(100)
console.log(z)

The result is one less!!! The result is [ 126, 76506002282294, 1496703205376 ], which should be [ 126, 76506002282294, 01496703205376 ]

MikeMcl commented 2 years ago
x = new BigNumber(2);
z = x.pow(100);
console.log( z.toString() );    // '1.267650600228229401496703205376e+30'