bitcompare
Tool
tools/verify/bitcompare.py(program, Verify). Compare two raw dumps value by value, bit for bit: ground truth against a port's output.
Run it with ./gameframe run bitcompare ARGS or python3 tools/verify/bitcompare.py. Source on GitHub.
Its own help
This is the help text in the tool itself, as ./gameframe tool bitcompare prints it.
text
Compare two raw dumps value by value, bit for bit: ground truth against a port's output.
Usage: bitcompare.py TYPE EXPECTED.bin ACTUAL.bin [--show N]
TYPE is f32, f64, i32, u32, i16, u16 or u8. Floats are compared by their bits, so 0.0 and -0.0
differ and NaNs compare equal only when identical, which is what bit-exact means. Prints the
match count, the first N mismatches with their index (default 10) and, for floats, the largest
difference in units in the last place (ULP): 1 ULP usually means one operation in a different
order or precision; large differences mean a wrong formula or a wrong input. Exit status 1 on
any mismatch.Named by
Skills: re-emulate, re-verify.
Agents: re-verifier, re-matcher.