Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigDecimal#-

a - b → bigdecimal
Subtract the specified value.
e.g.
c = a - b
The precision of the result value depends on the type of +b+.
If +b+ is a Float, the precision of the result is Float::DIG+1.
If +b+ is a BigDecimal, the precision of the result is +b+'s precision of
internal representation from platform. So, it's return value is platform
dependent.
No documentation available
See also #+@ #-@ #+ #/ also in 3.3 · 3.2 · 3.1