bigdecimal
bigdecimal copied to clipboard
Clarify how the initial value is converted down to the given number of significant digits in Kernel.BigDecimal
The digits
parameter of Kernel#BigDecimal is documented like this:
The number of significant digits, as an Integer. If omitted or 0, the number of significant digits is determined from the initial value.
However, it’s not specified how the initial value is converted down to the given number of significant digits in Kernel.BigDecimal. It seems like the value is rounded (instead of truncated, floored or ceiled), but it’s not clear from the documentation.