class String

def to_d


See also BigDecimal::new.

"45.67 degrees".to_d # => 0.4567e2
"123.45e1".to_d # => 0.12345e4
"0.5".to_d # => 0.5e0

require 'bigdecimal/util'
require 'bigdecimal'

as a BigDecimal.
Returns the result of interpreting leading characters in +str+

str.to_d -> bigdecimal
call-seq:
def to_d
  BigDecimal.interpret_loosely(self)
end