def order_of_magnitude(value, options={})
      base = options[:base] || 10 # value.num_class.radix
      if value.class.radix == base
        value.adjusted_exponent + 1
      else
        value.abs.log(base).floor + 1
      end
    end
def order_of_magnitude(value, options={})
      base = options[:base] || 10 # value.num_class.radix
      if value.class.radix == base
        value.adjusted_exponent + 1
      else
        value.abs.log(base).floor + 1
      end
    end
Options:

 * :input_rounding (optional, a non-exact Rounding or rounding mode)
   which is used when input is approximate as the assumed rounding
   mode which would be used so that the result numeral rounds back
   to the input number. :context can be used to use the
   numeric context as input rounding.
   input_rounding is also used to round input ...