Note that
you should almost never use floating-point (double or float types) for currency calculations. Floating-point is an approximate method of calculation, for values of widely-varying magnitude. When lots of calculations are done using floating-point, significant errors can build up.
For currency, all values have a fairly similar magnitude, and certainly are significant to the same place. Also, exact answers are required.
Currency calculations should almost always be done using integers (int or long types). A common trick is to use an integer to store the value in the smallest
unit of the currency (e.g. cents or pence) and do all calculations in those units. Only convert to the larger unit (e.g. dollars, euros, pounds) for final display to the user.