chiark / gitweb /
math/strongprime.c: Choose the smaller primes' sizes more carefully.
The old code would indeed, as the warning in the comment said, produce
numbers which are larger than requested because the component primes'
sizes were chosen in a naïve manner. I've now (eventually!) thought
about the issue some more and come up with a better approach.
The `BITSLOP' macro is now gone, replaced by a carefully chosen value
supported by some actual mathematics. As a result, the warning comments
have been removed. Also, `strongprime' will fail if it actually returns
a number of the wrong size.