We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
toPrecision
1 parent eb6a1f2 commit 3f02d4dCopy full SHA for 3f02d4d
bignumber.js
@@ -1277,7 +1277,7 @@
1277
if (e + 1 > len) {
1278
if (--i > 0) for (str += '.'; i--; str += '0');
1279
} else {
1280
- i += e - len;
+ i -= ne + (id === 2 && e > ne);
1281
if (i > 0) {
1282
if (e + 1 == len) str += '.';
1283
for (; i--; str += '0');
bignumber.mjs
@@ -1267,7 +1267,7 @@ function clone(configObject) {
1267
1268
// Fixed-point notation.
1269
1270
- i -= ne;
1271
str = toFixedPoint(str, e, '0');
1272
1273
// Append zeros?
0 commit comments