new
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (5)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (19)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (-38)
- What's this?
new(*args)
public
Create a new BigDecimal object.
initial |
The initial value, as an Integer, a Float, a Rational, a BigDecimal, or a String. If it is a String, spaces are ignored and unrecognized characters terminate the value. |
digits |
The number of significant digits, as a Fixnum. If omitted or 0, the number of significant digits is determined from the initial value. |
The actual number of significant digits used in computation is usually larger than the specified number.
Exceptions
If the initial type is neither Fixnum, Bignum, Float, Rational, nor BigDecimal, this exception is raised. | |
If the digits is not a Fixnum, this exception is raised. | |
If initial is a Float, and the digits is larger than Float::DIG + 1, this exception is raised. | |
If the initial is a Float or Rational, and the digits value is omitted, this exception is raised. |