Hacker News new | ask | show | jobs
by oasisaimlessly 54 days ago
I don't think this is true. Modulo the sign bit, the "next float" operator is equivalent to the next bitstring or the integer++.
1 comments

Sure, but that operator can propagate a carry all the way to the most significant bit, so a check for bitwise equality after "strip[ping] few least significant bits" will yield false in some cases. The pathologically worst case for single precision, for example, is illustrated by the value 2.0 (bitwise 0x40000000) and its predecessor, which differ in all bits except the sign.