News for hackers. Stuff that matters.
Re:Ask HN: Have you ever migrated a large/old project to a d... by andrewf on Wednesday September 14, 2022 @06:17AM (#32835209)
I once ported a small amount of code from C to a managed language. The C code used single precision floats (24 bit significand), the target language supported only double precision (53 bit significand). There was little enough math that it was practical to do something like frob = x * 2 ** (53-24); x += frob; x -= frob; to truncate the extra bits and produce the same result, for easier verification.

There are no comments on this comment yet.