in reply to Decimal Arithmetic

When working with people's money it is usually wise to use pennies (or their local equivalent). This leaves you with integers and avoids (or at least delays) those nasty rounding problems. Only round to the penny at the end of a calculation and store only pennies.

If the numbers are large, use Math::BigInt.

If you have things like fractional stock shares, consider using the penny concept where a penny becomes the smallest unit you will display to the customer. Store those as ints.

Phil