Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigDecimal#to_f

to_f

Returns a new Float object having approximately the same value as the BigDecimal number. Normal accuracy limits and built-in errors of binary Float arithmetic apply.

See also #to_digits #to_i #to_d #to_int also in 3.3 · 3.2 · 3.1