nfield
A tool for digit fields, alignment,
and collision arithmetic.
I wrote nfield to get the calculations out of one-off programs and into something I could query, sweep, test, and reuse. You can reproduce a calculation from a paper, change the base or denominator, and see what changes.
What you can investigate
Choose an example to runFractional fields and alignment
Study rational numbers as complete fractional fields. Compare their cycles, symmetries, and alignment across bases, then classify whole ranges of denominators by the structure they share.
three-tier classify 100 --base 10Compare alignment classes ↗The arithmetic of the golden ratio
Reproduce the exact threshold and polynomial calculations behind the golden-ratio paper. Change the prime, base, and resolution to examine when the golden ratio is selected.
reciprocal-square-selection scan 31Run the prime-selection scan ↗Collisions, primes, and spectra
Follow digit collisions into residue classes and character spectra. Compute exact collision tables, inspect the surviving frequencies, and evaluate their contributions over finite prime ranges.
collision-transform spectrum --base 10 --lag 1Compute a character spectrum ↗Sampling and boundary readings
Compare a continuous reading with a finite sampling grid. Inspect how individual components interact, including signed sampling defects and the contributions of boundary values.
field-observation clocks 4 0 1,2 0,0 1,-1 --matrixInspect the component matrices ↗Collision costs across residues
List the words that generate a prefix population, then examine a stopped collision cost on every residue. Keep the cyclic jumps and endpoint contributions visible when measuring total variation.
collision-sampling stopped-cost 64 2Read the stopped costs ↗Refinement and captured energy
Follow a finite detector through a change of scale. Compare its signed response with the complete cost of the probe, and inspect what the next resolution captures.
native-refinement probe-transport 2 --jsonFollow a probe across scales ↗Papers and checks
If you came here from a paper, help reading-map identifies the relevant commands. You can inspect one case, scan a range, or run a verifier’s fixed checks.
The output distinguishes exact arithmetic, numerical results, directed intervals, and bounded searches. A verifier reports what it actually checked.
Open the reading mapRun locally
The program is written in C. Build it with Make, LAPACK, BLAS, GMP, and MPFR. Running locally gives you larger inputs, shell completion, and the JSON/TCP daemon.
git clone https://github.com/alexspetty/nfield.git
cd nfield
make
./nfield field 7Build instructions