Skip to content

hyrodium/RiemannSphereOperations.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RiemannSphereOperations

Stable Dev Build Status codecov Aqua QA

Maths

This package provides some operations on the Riemann sphere $\hat{\mathbb{C}} = \mathbb{C} \cup \{\infty\}$.

The following are the calculation rules with the point at infinity $\infty$.

  • $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$

Package implementation

In this package, a value z which satisfies isinf(z) and !isnan(z) is used to represent the infinity $\infty$. Thus, all of complex(Inf,2.0), complex(Inf,-Inf), complex(1//0,1//1) are treated as the same point $\infty$ in this package.

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
NaN

This package has more functions such as isinfty′, +′, /′ etc. See the documentation page for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages