^
operator is bitwise xor, not power. In fact, Java has no power operator defined. You should use Math.pow
instead.
Additionally, you should use BigDecimal
when working with currencies, for a number of reasons you will find explained here on SO.