Documentation
¶
Overview ¶
Command floatparity generates a deterministic sweep of IEEE-754 doubles in the konareef-toml/v1 R8 range [0.0, 1.0e6], formats each through the Go canonical float rule, and emits the set as JSON for cross-implementation comparison against Erlang.
This harness checks the canonical TOML float formatting contract: confirm whether Go's strconv.FormatFloat and Erlang's :erlang.float_to_binary/2 [short] agree byte-for-byte across the allowed float range. A clean run lets the canonicalizer spec be locked; a divergence forces an explicit float-to-string algorithm.
Pipeline:
go run ./internal/canon/floatparity > samples.json escript internal/canon/floatparity/parity.erl samples.json
Exit 0 from the Erlang script = full parity. Exit 1 = at least one divergence, printed with the exact IEEE-754 bit pattern that caused it so the failing value can be reproduced bit-identically.