Automated validation of the CalcDomain expression engine. Three independent, reproducible suites are run at build time — the counts below reflect actual test results, not hardcoded numbers.
Report generated: 2026-08-15 · Engine version: 1.1.0 · Receipt format: 1.0.0
Total across all three suites: 1726/1726 checks pass.
SHA-256 of the canonical engine + vector sources: beeed0c48e6c96cdc8a3475b311e3c61df6b98dedf022463f379c4190b5b159f. This hash covers the expression engine, the engine test vectors and the independent reference vectors; it changes if any of those sources change.
Machine-readable manifests: Download JSON · Download CSV.
All computations use IEEE 754 double precision (64-bit floating point) — the native JavaScript number type. No arbitrary-precision or symbolic arithmetic is claimed or performed.
The engine detects and reports exact values for: integers up to 10¹⁵, simple rationals with denominator ≤ 30, perfect square roots (√k for integer k), and perfect cube roots (∛k for integer k). Results outside this scope are shown in rounded decimal or scientific notation only. Per-calculation independent verification (the "passed" status on a receipt) covers only exact integer/rational arithmetic with +, −, ×, ÷, integer powers and %; trigonometry, logarithms and other transcendental functions are reported as "verification unavailable", never as verified.
| Category | Total | Passed | Failed |
|---|---|---|---|
| precedence | 5 | 5 | 0 |
| unary-exponent | 4 | 4 | 0 |
| percentages | 6 | 6 | 0 |
| trig-deg | 5 | 5 | 0 |
| trig-rad | 3 | 3 | 0 |
| inverse-trig | 4 | 4 | 0 |
| hyperbolic | 4 | 4 | 0 |
| log-exp | 5 | 5 | 0 |
| roots | 4 | 4 | 0 |
| factorial | 3 | 3 | 0 |
| combinatorics | 4 | 4 | 0 |
| formatting | 4 | 4 | 0 |
| domain-error | 6 | 6 | 0 |
Every independently-sourced reference vector, with its expected value, tolerance, status and provenance. The same rows are available in the CSV and JSON manifests.
| ID | Category | Expression | Mode | Expected | Actual | Tolerance | Status | Provenance |
|---|---|---|---|---|---|---|---|---|
| ref-prec-01 | precedence | 2+3*4 | DEG | 14 | 14 | 0 | ✓ pass | Exact: multiplication binds before addition; 3*4=12, 12+2=14. |
| ref-prec-02 | precedence | (2+3)*4 | DEG | 20 | 20 | 0 | ✓ pass | Exact: parentheses first; 5*4=20. |
| ref-prec-03 | precedence | 2^3^2 | DEG | 512 | 512 | 0 | ✓ pass | Exact: exponentiation is right-associative; 2^(3^2)=2^9=512. |
| ref-prec-04 | precedence | (2^3)^2 | DEG | 64 | 64 | 0 | ✓ pass | Exact: 8^2=64. |
| ref-prec-05 | precedence | 2*3+4*5 | DEG | 26 | 26 | 0 | ✓ pass | Exact: 6+20=26. |
| ref-unary-01 | unary-exponent | -2^2 | DEG | -4 | -4 | 0 | ✓ pass | Exact: unary minus binds looser than ^; -(2^2)=-4. |
| ref-unary-02 | unary-exponent | (-2)^2 | DEG | 4 | 4 | 0 | ✓ pass | Exact: (-2)*(-2)=4. |
| ref-unary-03 | unary-exponent | 2^-2 | DEG | 0.25 | 0.25 | 0 | ✓ pass | Exact: 1/2^2 = 1/4 = 0.25. |
| ref-unary-04 | unary-exponent | -3^0 | DEG | -1 | -1 | 0 | ✓ pass | Exact: -(3^0) = -(1) = -1. |
| ref-pct-01 | percentages | 50% | DEG | 0.5 | 0.5 | 0 | ✓ pass | Exact: % divides its operand by 100; 50/100 = 0.5. |
| ref-pct-02 | percentages | 3*20% | DEG | 0.6 | 0.6000000000000001 | 1e-12 | ✓ pass | Exact math 3*(20/100)=0.6; decimal has IEEE-754 rounding, checked to 1e-12. |
| ref-pct-03 | percentages | 200+5% | DEG | 200.05 | 200.05 | 1e-10 | ✓ pass | Exact: postfix % gives 200 + 0.05 = 200.05 (the additive-percent trap). |
| ref-pct-04 | percentages | 200-5% | DEG | 199.95 | 199.95 | 1e-10 | ✓ pass | Exact: 200 - 0.05 = 199.95. |
| ref-pct-05 | percentages | 200*(1+5%) | DEG | 210 | 210 | 1e-10 | ✓ pass | Exact: 200*1.05 = 210 (commercial "increase by 5%"). |
| ref-pct-06 | percentages | 200*(1-5%) | DEG | 190 | 190 | 1e-10 | ✓ pass | Exact: 200*0.95 = 190 (commercial "decrease by 5%"). |
| ref-trig-01 | trig-deg | sin(30) | DEG | 0.5 | 0.49999999999999994 | 1e-12 | ✓ pass | Exact: sin(30°)=1/2. |
| ref-trig-02 | trig-deg | cos(60) | DEG | 0.5 | 0.5000000000000001 | 1e-12 | ✓ pass | Exact: cos(60°)=1/2. |
| ref-trig-03 | trig-deg | sin(45) | DEG | 0.7071067811865476 | 0.7071067811865475 | 1e-12 | ✓ pass | Reference constant √2/2 transcribed to 17 significant figures. |
| ref-trig-04 | trig-deg | tan(45) | DEG | 1 | 0.9999999999999999 | 1e-12 | ✓ pass | Exact: tan(45°)=1. |
| ref-trig-05 | trig-deg | cos(30) | DEG | 0.8660254037844386 | 0.8660254037844387 | 1e-12 | ✓ pass | Reference constant √3/2 transcribed to 17 significant figures. |
| ref-trigr-01 | trig-rad | sin(pi/6) | RAD | 0.5 | 0.49999999999999994 | 1e-12 | ✓ pass | Exact: sin(π/6)=1/2. |
| ref-trigr-02 | trig-rad | cos(pi/3) | RAD | 0.5 | 0.5000000000000001 | 1e-12 | ✓ pass | Exact: cos(π/3)=1/2. |
| ref-trigr-03 | trig-rad | tan(pi/4) | RAD | 1 | 0.9999999999999999 | 1e-12 | ✓ pass | Exact: tan(π/4)=1. |
| ref-inv-01 | inverse-trig | asin(0.5) | DEG | 30 | 30.000000000000004 | 1e-10 | ✓ pass | Exact: arcsin(1/2)=30°. |
| ref-inv-02 | inverse-trig | acos(0.5) | DEG | 60 | 60.00000000000001 | 1e-10 | ✓ pass | Exact: arccos(1/2)=60°. |
| ref-inv-03 | inverse-trig | atan(1) | DEG | 45 | 45 | 1e-10 | ✓ pass | Exact: arctan(1)=45°. |
| ref-inv-04 | inverse-trig | atan(1) | RAD | 0.7853981633974483 | 0.7853981633974483 | 1e-12 | ✓ pass | Reference constant π/4 transcribed to 17 significant figures. |
| ref-hyp-01 | hyperbolic | sinh(1) | DEG | 1.1752011936438014 | 1.1752011936438014 | 1e-12 | ✓ pass | Reference value of sinh(1)=(e−1/e)/2, transcribed decimal literal. |
| ref-hyp-02 | hyperbolic | cosh(1) | DEG | 1.5430806348152437 | 1.5430806348152437 | 1e-12 | ✓ pass | Reference value of cosh(1)=(e+1/e)/2, transcribed decimal literal. |
| ref-hyp-03 | hyperbolic | tanh(1) | DEG | 0.7615941559557649 | 0.7615941559557649 | 1e-12 | ✓ pass | Reference value of tanh(1), transcribed decimal literal. |
| ref-hyp-04 | hyperbolic | cosh(0) | DEG | 1 | 1 | 0 | ✓ pass | Exact: cosh(0)=1. |
| ref-log-01 | log-exp | log(1000) | DEG | 3 | 3 | 1e-12 | ✓ pass | Exact: log10(1000)=3. |
| ref-log-02 | log-exp | ln(2) | DEG | 0.6931471805599453 | 0.6931471805599453 | 1e-12 | ✓ pass | Reference constant ln(2) transcribed to 17 significant figures. |
| ref-log-03 | log-exp | exp(1) | DEG | 2.718281828459045 | 2.718281828459045 | 1e-12 | ✓ pass | Reference constant e transcribed to 17 significant figures. |
| ref-log-04 | log-exp | log(100) | DEG | 2 | 2 | 1e-12 | ✓ pass | Exact: log10(100)=2. |
| ref-log-05 | log-exp | exp(0) | DEG | 1 | 1 | 0 | ✓ pass | Exact: e^0=1. |
| ref-root-01 | roots | sqrt(2) | DEG | 1.4142135623730951 | 1.4142135623730951 | 1e-12 | ✓ pass | Reference constant √2 transcribed to 17 significant figures. |
| ref-root-02 | roots | sqrt(9) | DEG | 3 | 3 | 0 | ✓ pass | Exact: √9=3. |
| ref-root-03 | roots | cbrt(27) | DEG | 3 | 3 | 0 | ✓ pass | Exact: ∛27=3. |
| ref-root-04 | roots | cbrt(-8) | DEG | -2 | -2 | 0 | ✓ pass | Exact: ∛(−8)=−2. |
| ref-fact-01 | factorial | 5! | DEG | 120 | 120 | 0 | ✓ pass | Exact: 5!=120. |
| ref-fact-02 | factorial | 10! | DEG | 3628800 | 3628800 | 0 | ✓ pass | Exact: 10!=3,628,800. |
| ref-fact-03 | factorial | 0! | DEG | 1 | 1 | 0 | ✓ pass | Exact: 0!=1 by definition. |
| ref-comb-01 | combinatorics | nCr(10,3) | DEG | 120 | 120 | 0 | ✓ pass | Exact: C(10,3)=120. |
| ref-comb-02 | combinatorics | nCr(52,5) | DEG | 2598960 | 2598960 | 0 | ✓ pass | Exact: C(52,5)=2,598,960 (poker hands). |
| ref-comb-03 | combinatorics | nPr(10,3) | DEG | 720 | 720 | 0 | ✓ pass | Exact: P(10,3)=720. |
| ref-comb-04 | combinatorics | nCr(6,3) | DEG | 20 | 20 | 0 | ✓ pass | Exact: C(6,3)=20. |
| ref-fmt-01 | formatting | 1/3 | DEG | 0.333333333333 | 0.333333333333 | 0 | ✓ pass | Exact: 1/3 formatted to the engine default of 12 significant figures. |
| ref-fmt-02 | formatting | 1000000000000 | DEG | 1e+12 | 1e+12 | 0 | ✓ pass | Exact: values ≥ 1e12 switch to scientific notation. |
| ref-fmt-03 | formatting | 0.000000001 | DEG | 1e-9 | 1e-9 | 0 | ✓ pass | Exact: values < 1e-9 switch to scientific notation. |
| ref-fmt-04 | formatting | 6.02e23 | DEG | 6.02e+23 | 6.02e+23 | 1000000000000 | ✓ pass | Exact: Avogadro-scale magnitude parsed from scientific-notation input; absolute tolerance scaled to magnitude. |
| ref-err-01 | domain-error | sqrt(-1) | DEG | error:DOMAIN_ERROR | error:DOMAIN_ERROR | 0 | ✓ pass | Real sqrt of a negative number is undefined → DOMAIN_ERROR. |
| ref-err-02 | domain-error | log(0) | DEG | error:DOMAIN_ERROR | error:DOMAIN_ERROR | 0 | ✓ pass | log10(0) is undefined → DOMAIN_ERROR. |
| ref-err-03 | domain-error | asin(2) | DEG | error:DOMAIN_ERROR | error:DOMAIN_ERROR | 0 | ✓ pass | arcsin argument outside [−1,1] → DOMAIN_ERROR. |
| ref-err-04 | domain-error | tan(90) | DEG | error:TRIG_SINGULARITY | error:TRIG_SINGULARITY | 0 | ✓ pass | tan(90°) is a singularity → TRIG_SINGULARITY. |
| ref-err-05 | domain-error | 1/0 | DEG | error:DIVISION_BY_ZERO | error:DIVISION_BY_ZERO | 0 | ✓ pass | Division by zero → DIVISION_BY_ZERO. |
| ref-err-06 | domain-error | 171! | DEG | error:OVERFLOW | error:OVERFLOW | 0 | ✓ pass | 171! exceeds the largest finite IEEE-754 double → OVERFLOW. |