Quasilinear algorithm speeds up real Cayley–Dickson multiplication
Quasilinear multiplication in the real Cayley--Dickson tower
Symbolic Computation
Summary
Multiplying numbers in the real Cayley–Dickson algebra usually takes a lot of time because the straightforward method scales quadratically with size. The authors provide a new algorithm that multiplies these numbers much faster, using fewer steps as the dimension grows. They also created and tested a software library implementing this method, showing it runs faster than older approaches for large sizes. This makes working with Cayley–Dickson algebras more efficient in practice.
What this means in practice
- •For numerical computing developers: Implement faster Cayley–Dickson algebra multiplication in numerical libraries for improved performance on high-dimensional algebraic calculations.
- •For computer graphics programmers: Reduce computation time when using Cayley–Dickson algebras for rotations and transformations in graphics and simulations.
Authors
Harrison Lemley
Abstract
Direct evaluation of the defining product in the real Cayley--Dickson algebra $A_n$, of dimension $N=2^n$, has quadratic arithmetic complexity. This paper gives a uniform algorithm for multiplication using $O(N\log N)$ real arithmetic operations and $O(N)$ auxiliary storage. The algorithm reduces multiplication to the alternating product on the imaginary subspace, then evaluates that product by a two-call recursion over one fixed quadratic coefficient extension. For $n\ge1$, the resulting bilinear algorithm uses at most $(9n-15)2^{n-1}+10$ input-dependent real multiplications, and for $n\ge3$, the specified arithmetic schedule uses $(34n-83)2^{n-1}+50$ real operations in total. Under this counting convention, the quasilinear schedule uses fewer operations than direct multiplication for $N\ge16$ and than the uniform Cariow--Cariowa method for $N\ge32$. The algorithm is implemented in the MIT-licensed C11 library fastCD, with a NumPy-backed Python interface, and its results are checked against an independent implementation of the defining recursion. In single-core benchmarks against direct multiplication and the uniform Cariow--Cariowa method, the quasilinear implementation had the lowest mean time of the three at every tested dimension $N\ge32$, for both single and batched products, and was roughly $16$ times faster than direct multiplication at $N=1024$.