proj

constexpr double conj(const Complex &z) noexcept

Projects a complex number onto the Riemann sphere. Performs the same operation as std::proj. [1]

Parameters

const Complex &z

Returns

type Complex

A complex number.

If z is a complex infinity, the function returns Complex(INF, 0.0) or Complex(INF, -0.0), with the sign bit on the zero corresponding to the sign of \(\Im(z)\). Otherwise, z is returned.

Example

Complex z(INF.real(), -1);
std::cout << proj(z) << "\n";

Output:

inf - 0j

References