This package provides some operations on the Riemann sphere
The following are the calculation rules with the point at infinity
$a + \infty = \infty \quad (a\in\mathbb{C})$ $a \cdot \infty = \infty \quad (a\in\mathbb{C}\setminus\{0\})$ $\infty \cdot \infty = \infty$ $1/0 = \infty$ $1/\infty = 0$
Note that the following cannot be defined.
$0 / 0$ $0 \cdot \infty$ $\infty / \infty$ $\infty + \infty$ $\infty - \infty$
In this package, a value z which satisfies isinf(z) and !isnan(z) is used to represent the infinity complex(Inf,2.0), complex(Inf,-Inf), complex(1//0,1//1) are treated as the same point
All of the exported functions from this package has ′ (\prime<tab>) suffix which represents a modified version of the function on the Riemann sphere.
julia> using RiemannSphereOperations
julia> inv(complex(0,0)) # 1/0 should be ∞
NaN + NaN*im
julia> inv′(complex(0,0))
Inf - Inf*im
julia> complex(1) * Complex(Inf,-Inf) # 1⋅∞ should be ∞
NaN + NaN*im
julia> complex(1) *′ Complex(Inf,-Inf)
Inf - Inf*im
julia> Inf + Inf # ∞+∞ cannot be defined
Inf
julia> Inf +′ Inf
NaNThis package has more functions such as isinfty′, +′, /′ etc.
See the documentation page for more information.