Skip to content

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

instance method

Complex#fdiv

cmp.fdiv(numeric) → complex

Performs division as each part is a float, never returns a float.

Example
Complex(11, 22).fdiv(3)  #=> (3.6666666666666665+7.333333333333333i)
See also #denominator #finite? #conjugate #hash also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0