Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/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.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: