Dividing a nonzero value by 0 should give an infinite result. This works fine for floating point numbers, but not for complex:
julia> 1. / 0.
Inf
julia> 1. / (0.+0.im)
NaN + NaN*im
Similarly, dividing by infinity (with a finite numerator) should give 0. This isn't working entirely properly:
julia> 1/Inf
0.0
julia> 1/(Inf*im)
0.0 - 0.0im
julia> 1/(Inf + 0*im)
0.0 - 0.0im
julia> 1/(Inf + Inf*im)
NaN + NaN*im # this is wrong
Finally, in my opinion, there should be only a single ComplexInf value and not allow this:
julia> a = 3+Inf*im
3.0 + Inf*im
julia> b = 4+Inf*im
4.0 + Inf*im
julia> a==b
false
Both a and b should have evaluated to a common ComplexInf value. (We may also need a ComplexNaN.) Separate +Inf and -Inf is fine for Real values.
Dividing a nonzero value by 0 should give an infinite result. This works fine for floating point numbers, but not for complex:
Similarly, dividing by infinity (with a finite numerator) should give 0. This isn't working entirely properly:
Finally, in my opinion, there should be only a single
ComplexInfvalue and not allow this:Both
aandbshould have evaluated to a commonComplexInfvalue. (We may also need aComplexNaN.) Separate+Infand-Infis fine forRealvalues.