Skip to content

cycleless/cliff64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cliff64 logo

cliff64

Deterministic, Integer-Only Geometric Algebra (Clifford Algebra)

2D to 6D Bare-Metal Multivectors


Why cliff64? (Against the Float Tyranny)

Standard Geometric Algebra (GA) libraries are plagued by f32/f64 non-determinism and floating-point drift. In high-stakes environments—microcontrollers, FPGAs, or consensus-critical simulations—you can't afford a single bit of divergence.

cliff64 is a zero-cost, no_std powerhouse that treats geometry as pure integer logic. We use i64 for all multivector components, ensuring bit-perfect reproducibility across any architecture.

Core Specs

The engine supports Clifford Algebra $\mathcal{G}_{n}$ from dimensions 2 to 6 with total bit-level precision. Every calculation is strictly exact because we eliminated the FPU noise and rounding errors entirely. Procedural macros inject algebra structures and multiplication tables directly into the binary at compile-time. This results in hardcore performance via no_std, no_alloc logic and branchless sign computations optimized for i64 ALU pipelines. The implementation remains 100% safe with zero unsafe blocks, relying fully on the Rust type system for memory integrity.

The Mathematical Edge

Clifford Algebra (Geometric Algebra) unifies scalars, vectors, and bivectors into a single, powerful multivector representation. By forcing integer math, we achieve exact collision detection without the "ghost" intersections caused by float epsilon drift. This ensures deterministic physics with perfect replayability across different architectures. The code is embedded-ready and runs on anything from a $1 RISC-V microcontroller to high-performance server clusters without modification.

The "Just Right" Use Cases

  1. Robotics and Inverse Kinematics: Calculate joint rotations and bone positions without gimbal lock or accumulating floating-point errors that eventually cause mechanical "shaking".
  2. Geometric Deep Learning: Run Clifford Neural Networks (CLNN) directly on low-power IoT edge devices for pattern recognition in multidimensional signal data.
  3. Zero-Knowledge Proofs (ZKP): Use deterministic geometric transformations as part of arithmetic circuits where any non-determinism in the field would break the proof.
  4. Satellite Navigation: High-precision orbital mechanics simulation where float divergence over long time intervals leads to kilometer-scale errors.

More on math foundations: http://bivector.net

Check the math foundations here: http://en.wikipedia.org/wiki/Geometric_algebra

Quickstart

use cliff64::point::engine::MVec2D;

fn main() {
    // Exact 2D Multivector multiplication
    let a = MVec2D { e1: 2, e2: 3, ..MVec2D::new(0, 0, 0, 0) };
    let b = MVec2D { e1: 1, e2: 4, ..MVec2D::new(0, 0, 0, 0) };

    let res = a * b; // Geometric Product
    println!("Scalar: {}, Bivector e12: {}", res.s, res.e12);
}

License

GNU AGPL v3. Deterministic math belongs to everyone.

Cycleless Logo

CYCLELESS RnD
Zero Cycles. Absolute Precision.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages