class Rational
def to_d(precision)
See also BigDecimal::new.
Rational(22, 7).to_d(3) # => 0.314e1
require 'bigdecimal/util'
require 'bigdecimal'
significant digits for the result.
The required +precision+ parameter is used to determine the number of
Returns the value as a BigDecimal.
rat.to_d(precision) -> bigdecimal
call-seq:
def to_d(precision) BigDecimal(self, precision) end