bigdecimal icon indicating copy to clipboard operation
bigdecimal copied to clipboard

Clarify how the initial value is converted down to the given number of significant digits in Kernel.BigDecimal

Open manueljacob opened this issue 5 years ago • 0 comments

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.

manueljacob avatar Feb 21 '20 22:02 manueljacob