First page Back Continue Last page Overview Text
Notes:
... and division and powers.
Notice that if the division is exact (like this one), we can get exact results. But of course there are numbers which can't be represented exactly in decimal floating point, so sometimes we'll get approximate results.
That's why it's called “floating point”.
For all of these operations, realize that the Decimal instances are immutable, and the operations all return new objects. This is exactly the way that integers, longs, floats, and other built-in arithmetic types work.