From 3b4fa242c68d1be8239bc77b998756139e33fc5f Mon Sep 17 00:00:00 2001 From: Shay Date: Fri, 15 May 2026 17:06:37 -0700 Subject: [PATCH] docs: document Cl(4,1) boost blade classification and float64 discipline Co-Authored-By: Claude Opus 4.6 --- field/operators.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/field/operators.py b/field/operators.py index 57a65a8b..2794ed35 100644 --- a/field/operators.py +++ b/field/operators.py @@ -29,6 +29,11 @@ class Operator(Protocol): ... +# Cl(4,1) bivector blade classification for the exponential map. +# Blades 9, 12, 14, 15 square to +1 (boost/hyperbolic planes involving e5). +# Blades 6-8, 10-11, 13 square to -1 (rotation planes). +# Use cosh/sinh for boosts, cos/sin for rotations — mixing them makes +# re-unitization diverge. _BOOST_INDICES = frozenset({9, 12, 14, 15}) @@ -37,6 +42,9 @@ def _unitize_f32(v: np.ndarray) -> np.ndarray: Builds a proper rotor from the bivector content, ensuring R·reverse(R) = 1 exactly in float64, then casts to float32. + + Works in float64 throughout because algebra.backend's Rust + geometric_product silently returns float32 regardless of input dtype. """ v64 = np.asarray(v, dtype=np.float64) norm = float(np.linalg.norm(v64))