Hacker News new | ask | show | jobs
by jk-jeon 323 days ago
Note that the consumer side doesn't really have a lot of ambiguity. You just read the number, compute its precise value as written, round it to the closest binary representation with banker's rounding. You do anything other than this only under very special circumstances. Virtually all ambiguity lies on the producer side, which can be cleared out by using any of the formatting algorithms with the roundtripping-guarantee.

EDIT: If you're talking about decimal->binary->decimal round-tripping, it's a completely different story though.