Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Numeric#fdiv

(::Numeric) -> ::Numeric
fdiv(other) → float

Returns the quotient self/other as a float, using method / as defined in the subclass of Numeric. (Numeric itself does not define /.)

Of the Core and Standard Library classes, only BigDecimal uses this implementation.

See also #eql? #finite? #dup #floor also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0