Eisenstein Integers

Exact hexagonal arithmetic. Zero drift after 10,000 rotations.

IEEE 754 Float

Rotations: 0
Drift: 0.000px

Eisenstein E12

Rotations: 0
Drift: 0.000px
Both points start at (1, 0) and rotate by the same angle each step. Float accumulates error. E12 doesn't.

Explore the Hexagonal Lattice

Click any point. Hover to see D6 symmetries. Scroll to zoom. Drag to pan.

E12:
Norm:
Cartesian:
Angle:
D6 orbit:

Eisenstein Playground

Snap angles, compute norms, explore rotations — all in your browser.

Snap angle to E12
Enter an angle and press Snap
Compute E12 properties
Enter E12 coordinates
Drift comparison
Enter rotation count
HexDisk radius
3N²+3N+1 points

Float vs Eisenstein — Side by Side

Same operation, different math. See the drift accumulate in real-time.

Float (IEEE 754)
Click "Run Both" to start
Eisenstein E12
Click "Run Both" to start

Rust Quickstart

// Cargo.toml: eisenstein = "0.3" use eisenstein::{E12, HexDisk}; let z = E12::new(-5, 3); assert_eq!(z.norm(), 49); // a²-ab+b² = 25+15+9 let dir = E12::snap_from_angle(0.0); let disk = HexDisk::radius(36); // 3,997 vertices
crates.io · GitHub · Errata · CUDA benchmarks