Only 17% of all 64-bit Integers are products of two 32-bit integers
47 points by sebg 4 days ago | 9 comments
henry2023 4 minutes ago
There are about 4 billion more 64 bit integers than 32 bit integers.
replyThe chance of a random 64 bit integer being a 32 bit integer is 0.0000000233 %
The chance of a random 64 bit integer being a product of two 32 bit integers is 17%
Nice
nyeah 20 minutes ago
At the upper end you burn through the dynamic range pretty quickly. Largest eight products of 8-bit fixed-point numbers:
reply {255 through 226 not used} 15 \* 15 = 225
{224 through 211 not used} 15 \* 14 = 14 \* 15 = 210
{197 through 209 not used} 15 \* 13 = 13 \* 15 = 195
14 \* 14 = 196
{183 through 194 not used} 14 \* 13 = 13 \* 14 = 182
Toy example. Of course with 32-bit x 32-bit products, you skip way more 64-bit numbers than shown above.pants2 34 minutes ago
I dream of a future where all 64-bit integers are products of 32-bit integers. Together, we can change math for the better.
replykleiba2 8 minutes ago
I upvoted you, not because I think your joke is particularly great, but I hate that HN has this tendency to downvote comments that are clearly meant as a humorous contribution. And I get it, no-one wants HN to turn into Reddit. I also understand that not every joke lands. But I just think it's unnecessary to downvote, you could simply ignore.
reply
While I find the 17% number interesting to think about, "most" is far less interesting. Multiplication doesn't care about order so you're instantly cutting 2^64 possibilities down to about 2^63. That's a hair's breadth away from "most" already, and considering even a tiny amount of overlapping results gets you there.
What gets interesting is actually trying to quantify the overlapping results.