2 ** 256 BigInteger in javascript
问题 Which will normally result in 1.157920892373162e+77 ,but what I want is the accurate number of 2 ** 256 like 1157920892731685487456125..... I has try big-integer and math.js but both can't show all of the number after calculate. 回答1: Works fine using big-integer : const bigInt = require('big-integer'); let value = bigInt(2).pow(256); console.log(value.toString()); // 115792089237316195423570985008687907853269984665640564039457584007913129639936 来源: https://stackoverflow.com/questions/45502194