Skip to main content

bignumber.js

varstand for0.123-12345.67
ccoefficient1,2,31,2,3,4,5,6,7
eexponent-14
ssign1-1
configdefault
DECIMAL_PLACES20
ROUNDING_MODE4/ROUND_HALF_UP
EXPONENTIAL_AT[-7, 20]
RANGE[-1e+9, 1e+9]

Number

Number-
toString(base=10)
toFixed(digits=0)小数点后 n 位, 0 < digits < 20
toPrecision(precision?)总的 n 个有效数字, 无 precision = toString
toExponential(fractionDigits?)1.23e+5