This is the math section of the formula verification report. Each area below lists every calculator in it with its passing cases and the kinds of check behind them; a calculator counts as independently cross-checked when at least one of its cases takes its expected value from outside the engine.
Math calculators by area
| Area | Calculators | With a suite | Independently cross-checked | Cases |
|---|---|---|---|---|
| Statistics & Probability | 178 | 178 | 176 | 24,299 |
| Algebra | 52 | 52 | 40 | 3,721 |
| Geometry & Trigonometry | 42 | 42 | 41 | 3,754 |
| Arithmetic & Number Theory | 50 | 50 | 40 | 4,016 |
What the largest math suites check
Counts say how much was checked; these say what. Each case below is quoted from its test file exactly as the runner recorded it, in the order the cases run, independent cross-checks first. Where a suite has more cases than fit, the count in brackets says how many of that kind exist in total. The 8 largest suites in this category are shown; the other 84 are in the machine-readable report.
Regression for limited and non-normal outcomes (quantile, ordinal, multinomial, negative binomial, zero-inflated and censored models)
490 passing cases behind Quantile Regression Calculator, Ordinal Regression Calculator, Multinomial Logistic Calculator, Negative Binomial Regression Calculator, Zero-Inflated Calculator and Tobit Calculator: 52 independent cross-check, 14 golden, 19 boundary, 295 property and 110 structural.
- Independent cross-check — ordinal with two categories equals the separate binary logit
- Independent cross-check — multinomial with two categories equals that same logit
- Independent cross-check — and the two models agree with each other
- Independent cross-check — ordinal with two categories equals the separate binary logit
- Independent cross-check — multinomial with two categories equals that same logit
5 of 52 independent cross-check cases shown. The test file is scripts/validate-limitedoutcomes-engine.cjs.
Regularised and component regression (ridge, lasso, elastic net, principal component regression, partial least squares and cross-validation)
395 passing cases behind Ridge Regression Calculator, Lasso Regression Calculator, Elastic Net Calculator, Principal Component Regression Calculator, Partial Least Squares Calculator and Cross-Validation Calculator: 26 independent cross-check, 35 golden, 14 boundary, 239 property and 81 structural.
- Independent cross-check — elastic net with no lasso share equals ridge at penalty 0.001
- Independent cross-check — elastic net with no lasso share equals ridge at penalty 0.01
- Independent cross-check — elastic net with no lasso share equals ridge at penalty 0.05
- Independent cross-check — elastic net with no lasso share equals ridge at penalty 0.2
- Independent cross-check — the rescaled ridge coefficients match a raw least squares fit
5 of 26 independent cross-check cases shown. The test file is scripts/validate-regularised-engine.cjs.
Distribution engine (normal, t, chi-square, F, discrete)
219 passing cases behind p-value Calculator, Confidence Interval Calculator, Critical Value Calculator, Margin of Error Calculator, Standard Error Calculator, Sample Size Calculator, t-test Calculator, z-test Calculator, Normal Distribution Calculator, Binomial Distribution Calculator, Poisson Distribution Calculator, Hypergeometric Distribution Calculator, Geometric Distribution Calculator, Exponential Distribution Calculator, Weibull Distribution Calculator, Lognormal Distribution Calculator, Uniform Distribution Calculator, Negative Binomial Calculator, Beta Distribution Calculator and Empirical Rule Calculator: 20 independent cross-check, 73 golden, 10 boundary, 112 property and 4 structural.
- Independent cross-check — new normal CDF is accurate to 1e-14 at z=1.96 (error 1.11e-16)
- Independent cross-check — and is more accurate than the pre-existing A&S implementation (6.90e-8)
- Independent cross-check — Phi(-6) matches the published tail probability
- Independent cross-check — 1 - Phi(10) underflows to exactly zero (the failure being avoided)
- Independent cross-check — normalSf(10) keeps its digits: 7.6199e-24
5 of 20 independent cross-check cases shown. The test file is scripts/validate-distributions-engine.cjs.
Curve fitting, residual diagnostics and the sum-of-squares identity
188 passing cases behind Exponential Regression Calculator, Quadratic Regression Calculator, Logarithmic Regression Calculator, Power Regression Calculator, Residual Calculator and Sum of Squares Calculator: 5 independent cross-check, 144 golden, 19 boundary, 10 property and 10 structural.
- Independent cross-check — Cook's distance matches a full delete-and-refit at every point
- Independent cross-check — leverage matches the hat matrix diagonal
- Independent cross-check — and the leverages sum to exactly 2, the parameter count
- Independent cross-check — T^2/a^3 is constant across the eight planets to within 0.5%
- Independent cross-check — no grid point beats the Levenberg-Marquardt fit
5 of 5 independent cross-check cases shown. The test file is scripts/validate-curvefit-engine.cjs.
Probability engine (two events, trials, Bayes)
169 passing cases behind Probability Calculator, Birthday Paradox Calculator, Monty Hall Calculator, Expected Value Calculator, Bayes' Theorem Calculator and Conditional Probability Calculator: 41 independent cross-check, 51 golden, 21 boundary, 37 property and 19 structural.
- Independent cross-check — the positive predictive value is exactly 1/6
- Independent cross-check — nowhere near the 99% sensitivity
- Independent cross-check — five false positives per true one
- Independent cross-check — the negative predictive value is 99.9894%
- Independent cross-check — 99 true positives and 495 false ones out of 10,000
5 of 41 independent cross-check cases shown. The test file is scripts/validate-probability-engine.cjs.
Number properties engine
155 passing cases behind Absolute Value Calculator, Floor and Ceiling Calculator, Digital Root Calculator, Place Value Calculator, Consecutive Integers Calculator and Absolute Value Equation Calculator: 4 independent cross-check, 104 golden, 26 boundary, 8 property and 13 structural.
- Independent cross-check — floor, ceiling and truncation match Math on every exactly-representable case
- Independent cross-check — repeated addition and the mod-9 shortcut agree on 1..2000
- Independent cross-check — the closed form matches an exhaustive search across 2,100 cases
- Independent cross-check — every |ax+b| = c solution satisfies the original statement by substitution
- Golden — |−7| is 7
4 of 4 independent cross-check cases shown; 1 of 104 golden cases shown. The test file is scripts/validate-number-properties-engine.cjs.
Quantile engine (nine types + hinges)
151 passing cases behind Five Number Summary Calculator, Percentile Calculator, Quartile Calculator and IQR Calculator: 3 independent cross-check, 63 golden, 57 boundary, 6 property and 22 structural.
- Independent cross-check — type 7 matches standard-deviation.ts quantileSorted on 1200 fuzzed quantiles
- Independent cross-check — Excel PERCENTILE.INC({1,2,3,4},0.3) = 1.9
- Independent cross-check — Excel PERCENTILE.EXC({1,2,3,4},0.4) = 2.0
- Golden — R quantile 1:4 at p=0.25 type 1
- Golden — R quantile 1:4 at p=0.25 type 2
3 of 3 independent cross-check cases shown; 2 of 63 golden cases shown. The test file is scripts/validate-quantiles-engine.cjs.
Fraction to percent engine
144 passing cases behind Fraction to Percent Calculator: 53 golden, 31 boundary and 60 structural.
- Golden — 1/2 = 50%
- Golden — 1/4 = 25%
- Golden — 3/4 = 75%
- Golden — 2/5 = 40%
- Golden — 5/8 = 62.5%
5 of 53 golden cases shown. The test file is scripts/validate-fraction-to-percent-engine.cjs.
