apple / swift-numerics

Advanced mathematical types and functions for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Complex division (0, 0) / (0, 0) should return `.infinity`

NevinBR opened this issue · comments

Currently, dividing Complex(0, 0) by itself returns Complex(0, 0), but it should return .infinity to represent the undefined result.

This should be fixed in rescaledDivide, here:

if z.isZero || !w.isFinite { return .zero }

This issue can be closed, the bug fix has been merged.