xsy-breeze-ui-rpa > BigNumber > precision
BigNumber.precision() method
Returns the number of significant digits of the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
If includeZeros is true then any trailing zeros of the integer part of the value of this BigNumber are counted as significant digits, otherwise they are not.
Throws if includeZeros is invalid.
x = new BigNumber(9876.54321)
x.precision() // 9
y = new BigNumber(987000)
y.precision(false) // 3
y.precision(true) // 6
Signature:
precision(includeZeros?: boolean): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| includeZeros | boolean |
Returns:
number
