ProtoJSON e0 notation for large integers: quotes alone do not promise exact identity
Quotes alone do not guarantee exactness for every numeric notation.
The precision obligation after quoting
Quotes alone do not guarantee exactness for every numeric notation. Define permitted notation and precision together for exact identifiers. Copying a parser’s double into the Truthound reference would hide lost low digits; preserve the raw input and an arbitrary-precision reference first. [1, 2, 3]
The measured pin and remaining discussion
Protobuf #30634 measures rounding or rejection of quoted .0 and e0 integers on a pinned development C++ build. No correction was tested. A maintainer discusses revisiting precision guarantees for non-digit notation, so the report is not a final ruling on specification compliance or evidence for all released runtimes. [1]
Separate successful approximation from rejection
Compare digit-only, .0 and e0 controls against exact integers and prevent changed identifiers from entering reference keys. Retain parse status and decoded decimal so rejection differs from a successful approximation. Build the reference with exact integer arithmetic, independently of the parser under test. [1, 3]
The independent 2^53+1 reference
The illustrative exact value is 2^53+1=9007199254740993. Appending .0 or e0 leaves that mathematical integer unchanged. Decoded decimal 9007199254740993 meets exact identity; 9007199254740992 fails. A measurement permitting approximation requires a different policy. [1, 3]
Check prepared exact strings
Truthound Core Python SDK 3.3.2 can compare prepared exact_integer_decimal and decoded_decimal using ColumnPairValidator with relationship="==". The operator supplies non-missing exact strings and isolates parse errors separately. The SDK does not repair ProtoJSON parsing, settle the precision discussion or recover lost digits. [1, 2, 3]
Agree on identifier notation
For exact identifiers, use a digit-only decimal-string contract or a verified exact parser. Do not impose that identity contract on measurements approved for binary64 approximation. Agree on notation with consumers, cross-test it and keep the observed development pin separate from untested releases. [1, 3]
Application conditions
Build expected values with exact integer arithmetic, retain parse failures and never copy an approximate result into the reference.
Alternatives
Use digit-only decimal strings for exact identifiers or choose a verified exact parser.
Limitations
The SDK does not repair parsing or settle specification guarantees; findings remain scoped to the measured pin.
Evidence
- Event checked
- Subject checked
- Modified
