Report exchange amounts too small to have been measured - #260
Merged
Conversation
Databases carry amounts like 4e-37 kg. Nothing is measured at that magnitude: a hydrogen atom weighs 1.7e-27 kg, the same figure in joules sits eight orders below a single visible photon, and a count of items is quantised at one. Such a value is a residue of computation — an underflow, a conversion through a zero — that reads as data and travels with every copy of the dataset until someone looks. The floor is 1e-27 whatever the unit, far below the smallest real trace amount an inventory carries, so the check accuses only what no instrument could have produced. Warning, not danger: it distorts no score, it simply isn't true. Verified on two national releases: six findings each, from arsine at 7e-28 kg to a dioxin at 6e-32 kg. Low and discriminating, no flood.
An ordinary exchange below the measurable floor distorts no score, so it stays a warning. A reference exchange is what normalization divides by: a reference amount of ~1e-37 scales every other amount in the process by its reciprocal — the near-zero cousin of the zero-reference case the suspicious-amounts check already reports as danger. A negative one flips every sign on top. The finding now names the division. Also add the missing changelog entry and cover the floor boundary.
ccomb
force-pushed
the
unmeasurable_amounts
branch
from
July 26, 2026 21:44
070cdbd to
6fe5d73
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Databases carry exchange amounts like
4e-37 kg. Nothing is measured at thatmagnitude: a hydrogen atom weighs
1.7e-27 kg, the same figure in joules sitseight orders of magnitude below a single visible photon, and a count of items is
quantised at one.
A value like that is a residue of computation — an underflow, a conversion
through a zero, an allocation of nothing — that reads as data. It survives every
copy of the dataset until somebody looks, and none of the existing checks look:
suspiciousAmountscatches non-finite values and a zero reference amount, not anumber that is merely impossible.
What it does
A fourteenth structural check,
unmeasurableAmounts. The floor is1e-27whatever the unit, far below the smallest real trace amount an inventory carries,
so the check accuses only what no instrument could have produced. Zero passes: it
says the input is absent, which is a statement, not a residue.
Warning for an ordinary exchange — such an amount distorts no score, it simply
isn't true. Danger for a reference exchange: normalization divides every other
amount in the process by it, so a reference of ~1e-37 scales the whole process
by its reciprocal (and a negative one flips every sign).
Verified on real data
Two published national releases: six findings each, from arsine at
7e-28 kgthrough a dioxin at
6e-32 kgto titanium dioxide at7e-34 kg. Low anddiscriminating, no flood.