Added a method to calculate a currency's number of decimals.