Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/onboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ learn how angle impls PartialEq and Eq in src/angle.rs:635~653

learn how angle overloads arithmetic operators in src/angle.rs:655~844

learn how to construct geonum with new, new_with_angle from src/geonum_mod.rs:32~49
learn how to construct geonum with new, new_with_angle from src/geonum_mod.rs:23~49

learn how geonum overloads arithmetic operators in src/geonum_mod.rs:778~1044

learn how geonum can express any number type from the its_a_scalar:8-36, its_a_vector:39-72, its_a_real_number:75-108, its_an_imaginary_number:111-139, its_a_complex_number:142-174, its_a_dual_number:177-295, its_an_octonion:298-341 tests in tests/numbers_test.rs
learn how geonum can express any number type from the its_a_scalar:8-36, its_a_vector:39-72, its_a_real_number:75-108, its_an_imaginary_number:111-139, its_a_complex_number:142-174, its_a_dual_number:177-295, its_an_octonion:298-318 tests in tests/numbers_test.rs

learn how geonum eliminates angle slack created by decomposing angles into scalar coefficients by reading the it_proves_decomposing_angles_with_linearly_combined_basis_vectors_loses_angle_addition:13-84, it_proves_decomposition_distributes_one_angle_across_multiple_scalars:87-160, it_proves_quaternion_tables_add_back_what_decomposition_subtracts:519-660, it_proves_anticommutativity_exists_because_decomposition_subtracts_different_amounts:663-726 tests in tests/linear_algebra_test.rs

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# changelog

## 0.14.0 (2026-06-14)

### removed
- `affine` trait and feature — translate was `+`, shear was `rotate`; the layer only re-vocabularied the core

### fixed
- chemistry `electron_affinity` signs by subshell continuity (was a grade proxy), matching NIST except nitrogen
- `it_computes_ijk_product`, `its_an_octonion`: assert the primitive product's commutativity/associativity (`i·j = k`, `ijk = −1`) instead of bailing on the non-commutativity/non-associativity the decomposition table adds back (linear_algebra_test)

### added
- projection_test, curve_test, integral_test, exponential_test: line, area, and the integral as angle-first ops; `wave_sum` interference coverage in geocollection_test
- quaternion_test: the quaternion product factored — commutative rotor (`*`) and anti-symmetric wedge (`a∧b = −b∧a`), `ijk = −1` in blade arithmetic, rotation composition order-dependent by exactly the geometric angle; plus a guard test that `e3∧e1 = 0` is a dropped-blade shadow, not a broken cycle

## 0.13.0 (2026-05-24)

### breaking
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "geonum"
version = "0.13.0"
version = "0.14.0"
edition = "2021"
repository = "https://github.com/mxfactorial/geonum"
description = "geometric number library supporting unlimited dimensions with O(1) complexity"
Expand All @@ -17,9 +17,8 @@ projection = []
ml = []
em = []
waves = []
affine = []
chemistry = []
all = ["optics", "projection", "ml", "em", "waves", "affine", "chemistry"]
all = ["optics", "projection", "ml", "em", "waves", "chemistry"]

[dependencies]

Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,18 @@ cga_test.rs
chem_constants_test.rs
chemistry_test.rs
computer_vision_test.rs
curve_test.rs
dimension_test.rs
economics_test.rs
einstein_test.rs
em_field_theory_test.rs
exponential_test.rs
fem_test.rs
finance_test.rs
geocollection_test.rs
grade_test.rs
gravitational_wave_test.rs
integral_test.rs
linear_algebra_test.rs
machine_learning_test.rs
mechanics_test.rs
Expand All @@ -171,8 +175,10 @@ numbers_test.rs
optics_test.rs
optimization_test.rs
pga_test.rs
projection_test.rs
pseudoscalar_test.rs
qm_test.rs
quaternion_test.rs
rendering_test.rs
robotics_test.rs
schwarzschild_test.rs
Expand Down Expand Up @@ -396,11 +402,11 @@ geometric numbers build dimensions by rotating—not stacking
- its_an_imaginary_number:111-139
- its_a_complex_number:142-174
- its_a_dual_number:177-295
- its_an_octonion:298-341
- its_a_matrix:344-398
- its_a_tensor:401-595
- it_dualizes_log2_geometric_algebra_components:647-680
- its_a_clifford_number:940-1020
- its_an_octonion:298-318
- its_a_matrix:321-375
- its_a_tensor:378-572
- it_dualizes_log2_geometric_algebra_components:624-657
- its_a_clifford_number:917-997

- tests/pseudoscalar_test.rs
- it_solves_the_exponential_complexity_explosion:18-79
Expand Down
108 changes: 0 additions & 108 deletions src/traits/affine.rs

This file was deleted.

30 changes: 24 additions & 6 deletions src/traits/chemistry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ fn last_filled(z: usize) -> usize {
n
}

/// which (n, l) subshell the z-th electron lands in, by the madelung walk.
/// the affinity sign turns on whether the added electron continues a subshell
/// or opens a new one — `subshell_of(z + 1) == subshell_of(z)`
fn subshell_of(z: usize) -> (usize, usize) {
let mut placed = 0;
for (n, l) in Geonum::madelung_order(6) {
let cap = 2 * (2 * l + 1);
if placed + cap >= z {
return (n, l);
}
placed += cap;
}
(0, 0)
}

/// the unsigned binding of the (z+1)th electron stepping on — a screened (+1)
/// nucleus, projected over the anion's valence shell. shared by `electron_affinity`
/// (signed) and `electronegativity`
Expand Down Expand Up @@ -118,8 +133,8 @@ pub trait Chemistry: Sized {
fn ionization_energy(z: usize, electrons: usize, lattice: Lattice) -> f64;

/// signed electron affinity in eV: the next electron stepping on. bound
/// (positive) for open shells, repulsive (negative) where it would open a new
/// shell — a closed-shell marginal lands at grade 2 and the sign flips
/// (positive) when it extends the open subshell, repulsive (negative) when it
/// opens a fresh closure — the sign is `subshell_of(z + 1) == subshell_of(z)`
fn electron_affinity(z: usize, lattice: Lattice) -> f64;

/// Mulliken electronegativity, (IE1 + EA binding)/2
Expand Down Expand Up @@ -226,12 +241,15 @@ impl Chemistry for Geonum {
}

fn electron_affinity(z: usize, lattice: Lattice) -> f64 {
let marginal = Geonum::electron_wave(z + 1, lattice) - Geonum::electron_wave(z, lattice);
let bind = affinity_binding(z, lattice);
if marginal.angle.grade() == 2 {
-bind // a closed shell refuses the electron — repulsive
} else {
// bound iff the added (z+1)th electron extends the open subshell; unbound
// iff it is the first occupant of a fresh closure that repels it. grade
// cannot sign this — the alkali spin-pair (bound) and the noble shell
// jump (unbound) both land grade 2 — but subshell continuity can
if subshell_of(z + 1) == subshell_of(z) {
bind
} else {
-bind
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ pub mod waves;
#[cfg(feature = "waves")]
pub use waves::Waves;

#[cfg(feature = "affine")]
pub mod affine;
#[cfg(feature = "affine")]
pub use affine::Affine;

#[cfg(feature = "chemistry")]
pub mod chemistry;
#[cfg(feature = "chemistry")]
Expand Down
Loading