class Float
def to_d(precision=0)
See also BigDecimal::new.
1.234.to_d(2) # => 0.12e1
0.5.to_d # => 0.5e0
require 'bigdecimal/util'
require 'bigdecimal'
significant digits for the result (the default is Float::DIG).
The +precision+ parameter is used to determine the number of
Returns the value of +float+ as a BigDecimal.
float.to_d(precision) -> bigdecimal
float.to_d -> bigdecimal
call-seq:
def to_d(precision=0) BigDecimal(self, precision) end