R/MRatCalcpowered by RiXOpen calculator

RiX walkthrough · 8f

Exact Cayley polar form

Store complex magnitude and direction exactly without a transcendental angle.

Polar form without an angle

Ordinary polar form stores a magnitude and an angle. RiX's Cayley form instead stores Cayley(r, t), where r is the exact nonnegative magnitude and t = tan(theta/2) is the stereographic half-angle coordinate.

For 1 + i, both coordinates stay algebraic:

Runnable RiX

The result is Cayley(sqrt2, sqrt2 - 1). The positive sqrt2 generator is adjoined exactly; no decimal approximation or symbolic angle is introduced.

Exact conversion in both directions

For Cartesian x + iy, RiX computes r = sqrt(x^2 + y^2) and t = (r - x)/y. Conversion back uses only field arithmetic:

x = r(1 - t^2)/(1 + t^2) and y = r(2t)/(1 + t^2).

Runnable RiX

This reconstructs 3 + 4i, and the round trip returns Cayley(5, 1/2). The namespace spelling .Complex.Cartesian(c) is equivalent to the receiver method.

Multiplication is direction composition

If directions are t1 and t2, the product direction is (t1 + t2)/(1 - t1*t2). This is the tangent half-angle addition law. Magnitudes simply multiply.

Runnable RiX

Multiplication, division, integer powers, reciprocal, negation, and conjugation all stay in Cayley coordinates.

If two directions use independent square-root generators and the exact inverter cannot simplify the Möbius denominator directly, RiX takes an exact Cartesian bridge and returns the canonical Cayley result. This remains exact:

Runnable RiX

The result is Cayley(sqrt17, 4 - sqrt17) and 4 - i, with no floating approximation.

Addition takes the Cartesian bridge

Complex addition is simplest in Cartesian coordinates. RiX converts exactly, adds there, and converts the result back. The operator still returns a Cayley value.

Runnable RiX

Conjugation and inspection

Conjugation keeps the magnitude and negates the finite direction. Component methods reconstruct exact values only when requested.

Runnable RiX

Direction is deliberately not called Arg: it is tan(Arg/2), not an angle measured in radians.

The projective infinity direction

The negative real axis corresponds to t = Infinity. This is one projective direction, not floating-point infinity. RiX branches on it algebraically:

Runnable RiX

Here Infinity composed with itself gives direction zero, matching (-1)(-1) = 1.

Current boundary

The first implementation adjoins a magnitude root when the Cartesian norm squared is rational. That covers Gaussian rational values. General real-algebraic root isolation is future work; RiX reports this boundary instead of approximating silently.