= private = protected
to_f()
Return the value as a float.
Rational(2).to_f #=> 2.0 Rational(9, 4).to_f #=> 2.25 Rational(-3, 4).to_f #=> -0.75 Rational(20, 3).to_f #=> 6.666666666666667
static VALUE nurat_to_f(VALUE self) { get_dat1(self); return f_fdiv(dat->num, dat->den); }