Even with doubles, equality comparison against floating-point numbers is prone to errors when both of the results are computed.
It looks like you're doing math with money. You won't be surprised to hear that binary floating-point numbers are not used in financial environments.
See, e.g., t
http://www.netlib.org/misc/intel/
For your purposes, you can use integers instead. Put your currency into an integer, with plenty of extra precision. e.g., $12.34 can be represented as an integer like 12,340,000. It's possible to round integers nicely.
You shouldn't compare floating-point numbers for equality unless you have a good reason.
Binary floating point mathematics is relatively
arcane. If you are unfamiliar with the formats, you may generate results that are very unexpected, or solutions which appear to work but break down around the limits of the representations.
With this in mind, there are plenty of solutions sitting around the net for e.g., floating-point equality that are subtly wrong. Watch out for them.