
Verify the catalog: every entry evaluates to its known value
Source:R/08_identities.R
verify_catalog.RdEvaluates each entry of eml_catalog() at the test bindings from
SPEC TESTS T2 and checks the result against the known mathematical
value to numerical tolerance. Pure numeric verification — does NOT
require the simplifier to recognise the structural form.
See also
eml_catalog() for the catalog itself; simplify_native()
for the structural verifier (every entry should collapse to its
base-R primitive).
Examples
verify_catalog()
#> [OK ] one K=1 |err| = 0
#> [OK ] e K=3 |err| = 0
#> [OK ] zero K=7 |err| = 0
#> [OK ] neg_one K=17 |err| = 0
#> [OK ] two K=27 |err| = 0
#> [OK ] i K=75 |err| = 3.83e-16
#> [OK ] pi K=121 |err| = 1.65e-15
#> [OK ] exp K=3 |err| = 0
#> [OK ] log K=7 |err| = 1.11e-16
#> [OK ] minus K=17 |err| = 0
#> [OK ] add K=27 |err| = 0
#> [OK ] sub K=11 |err| = 8.88e-16
#> [OK ] mul K=41 |err| = 0
#> [OK ] div K=25 |err| = 4.44e-16
#> [OK ] pow K=49 |err| = 1.78e-15
#> [OK ] sqrt K=99 |err| = 4.71e-16
#> [OK ] sin K=423 |err| = 1.57e-16
#> [OK ] cos K=325 |err| = 2.22e-16