Only 17% of 64-bit integers factor into two 32-bit integers
A counterintuitive number-theory result: while multiplying two 32-bit integers can produce any 64-bit value in range, the set of 64-bit integers actually expressible as such a product covers only about 17% of the full 64-bit space. The density drops because many large 64-bit numbers have prime factors exceeding 2^32, making them unreachable from any pair of 32-bit operands.
The finding has practical implications for low-level performance work, hashing, and cryptographic primitives where engineers sometimes assume 32x32→64 multiplication can address the entire 64-bit range. It also matters for fuzzing and property-based testing strategies that sample 64-bit integers and expect them to decompose cleanly into smaller factors.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.