Re:Perfect Random Floating-Point Numbers
by kbolino on Wednesday May 07, 2025 @05:12PM
(#43920609)
In float32 land, if
then
But if we just added the bit patterns like integers, we would get 0x7d800000 (with a float value of over 10^37). Just because they are discrete doesn't mean they are integers only that they can be mapped one-to-one with integers. The bit pattern is not the semantic meaning of the value, and you cannot perform correct operations if you ignore the semantics.
[ Parent
| on HN ]
There are no comments on this comment yet.