Top Level Namespace
Defined Under Namespace
Modules: LongDecimalRoundingMode, LongMath Classes: Bignum, Complex, Fixnum, Integer, LongDecimal, LongDecimalBase, LongDecimalQuot, Numeric, Rational
Constant Summary collapse
- BYTE_SIZE_OF_ONE =
require “bigdecimal/math”
1.size
Instance Method Summary collapse
-
#LongDecimal(a, b = 0) ⇒ Object
Creates a LongDecimal number.
-
#LongDecimalQuot(first, second) ⇒ Object
construct a LongDecimalQuot from the given parameters 1st case: both are LongDecimals 2nd case: first is Rational, second is scale.
Instance Method Details
#LongDecimal(a, b = 0) ⇒ Object
Creates a LongDecimal number. a
and b
should be Numeric.
2348 2349 2350 2351 2352 2353 2354 |
# File 'lib/long-decimal.rb', line 2348 def LongDecimal(a, b = 0) if b == 0 && (a.kind_of? LongDecimal) then a else LongDecimal.new!(a, b) end end |
#LongDecimalQuot(first, second) ⇒ Object
construct a LongDecimalQuot from the given parameters 1st case: both are LongDecimals 2nd case: first is Rational, second is scale
2361 2362 2363 |
# File 'lib/long-decimal.rb', line 2361 def LongDecimalQuot(first, second) LongDecimalQuot.new!(first, second) end |