Mantissa & Exponent
- 更新时间2023-02-17
- 阅读时长2分钟
Mantissa & Exponent
Returns the mantissa and exponent of the input numeric value such that number = mantissa * 2^exponent.
If the input is 0, this node returns 0 for both the mantissa and exponent. Otherwise, . The exponent is always an integer.
Inputs/Outputs

number
An input of any decimal representation.

mantissa
The mantissa of number. This output is the same decimal representation as number.
If the input is 0, this node returns 0 for both the mantissa and exponent. Otherwise, .

exponent
The exponent of number. This output is the same decimal representation as number.
If the input is 0, this node returns 0 for both the mantissa and exponent. The exponent is always an integer.
Rounding Errors
number automatically rounds to the number of significant digits you specify. This rounding can cause incorrect mantissa calculation. The rounding error occurs when every digit through the last significant digit is 9 and the digit after the last significant digit is greater than 5. For example, if number is 31.99999 and you specify 4 significant digits, number rounds to 31.99, which then rounds to 32. As a result, the value of exponent is 4 and the value of mantissa is 2, though the mathematically correct value of mantissa is 1 in this case. The following table gives some examples of number values before and after rounding to 4 significant digits.
| number Before Rounding | number After Rounding |
|---|---|
| 31.99 | 31.99 [no error] |
| 31.888 | 31.89 [no error] |
| 31.994 | 31.99 [no error] |
| 31.999 | 32.00 [error] |