pub fn format_float_protoc(v: f32) -> StringExpand description
Protoc-style float: try 6 significant digits (%g), fall back to 9.
Mirrors Python’s _format_floating_point_like_protoc(short_precision=6, long_precision=9)
with the vanilla protoc (Google C++) exact bit-level round-trip check:
re-parse the 6g string as f32 and compare bits, falling back to 9g only when
the bit patterns differ. This replaces the former approximate 1e-7 tolerance (D3 fix).