I'm dealing with a float64 representation of money. For example, 2.9 for usd represents $2.90, so if I need to convert this to the lowest denomination for the currency, I just multiple by 100 (2.9*100= 290 cents).
This works with most major currencies. However, in Japan, for example, the float64 representation will not have a decimal because Yen is already the lowest representation. If I get float64(290) Yen, multiplying by 100 would give an excess number of Yen if I'm trying to obtain the lowest denomination - it should stay as is.
What's the best way to handle this besides special casing when to multiply by 100 for certain currencies?
EDIT: the two pieces of information I have are the float representation and the ISO currency code.