def instantiate amount, currency
      if amount.is_a?(BigDecimal)
        amount
      else
        BigDecimal.new(amount.to_s, precision_for(amount, currency))
      end
    end
def instantiate amount, currency
      if amount.is_a?(BigDecimal)
        amount
      else
        BigDecimal.new(amount.to_s, precision_for(amount, currency))
      end
    end
Use this to instantiate a currency amount. For one, it is important that we use BigDecimal here so nothing gets lost because
 of floating point errors. For the other, This allows us to set the precision exactly according to the iso definition
 @param [BigDecimal, Fixed, Float, String] amount The amount of money you want to instantiate
 @param [String, Symbol] currency The currency you want to instantiate the money in
 @return [BigDecimal] The instantiated currency
 @example instantiate a currency from a string
   Exchange::ISO.instantiate("4523", "usd") #=> #<Bigdecimal 4523.00>
 @note Reinstantiation is not needed in case the amount is already a big decimal. In this case, the maximum precision is already given.