Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Complex#fdiv

fdiv(numeric) → new_complex

Returns Complex(self.real/numeric, self.imag/numeric):

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.2 · 3.1 · 3.0