def fixed(value, places = 2)
      value = value.to_s.to_f unless value.is_a?(Float)
      sprintf("%0.#{places}f", value.round(places))
    end
def fixed(value, places = 2)
      value = value.to_s.to_f unless value.is_a?(Float)
      sprintf("%0.#{places}f", value.round(places))
    end
Formats a number to the specified number of decimal places.

 The +value+ can be either any valid numeric expression that can be converted to a float.