12 ms·
I think you're right. I produced a small rust program to test it by iterating over all 32-bit floats: https://gist.github.com/anchpop/30f119efd8d4c29a6a99202d57
by anchpop 2y ago
I think you're right. I produced a small rust program to test it by iterating over all 32-bit floats: https://gist.github.com/anchpop/30f119efd8d4c29a6a99202d57a509b5 https://gist.github.com/anchpop/30f119efd8d4c29a6a99202d57a5...
Output:
Count between 0 and 1: 1065353215
Count between 1 and +inf: 1073741824
Ratio: 1.0
But a more theoretical approach will probably be needed to see if the same ratio exists for 64 bit floats.