string.to_d â bigdecimal
Instance Public methods
Convert string
to a BigDecimal
and return it.
1 2 3 4 5 | require 'bigdecimal' require 'bigdecimal/util' "0.5" .to_d # => #<BigDecimal:1dc69e0,'0.5E0',9(18)> |
Convert string
to a BigDecimal
and return it.
1 2 3 4 5 | require 'bigdecimal' require 'bigdecimal/util' "0.5" .to_d # => #<BigDecimal:1dc69e0,'0.5E0',9(18)> |
Designed by : w10schools
service@w10schools.com
Please login to continue.