Skip to main content
added the EDIT
Source Link
Anton Mellit
  • 3.8k
  • 12
  • 32

I prefer primes like 1000003 and 1000000007 because it is easy to recognize small integers and rational numbers with small denominators in the output. For instance, modulo 1000003 we have 1/3=666669, -1/3=333334, 1/5=600002. I know that's not what you are asking from the mathematical point of view, but from practical point of view it is very helpful.

EDIT: To answer the OP question, my answer is no. There is no mathematical reason one prime can behave better than another one in an algebraic computation. Of course, larger primes are better because there are less coincidences when you ask if $x=0$. But that's it. I am happy to be proven wrong.

I prefer primes like 1000003 and 1000000007 because it is easy to recognize small integers and rational numbers with small denominators in the output. For instance, modulo 1000003 we have 1/3=666669, -1/3=333334, 1/5=600002. I know that's not what you are asking from the mathematical point of view, but from practical point of view it is very helpful.

I prefer primes like 1000003 and 1000000007 because it is easy to recognize small integers and rational numbers with small denominators in the output. For instance, modulo 1000003 we have 1/3=666669, -1/3=333334, 1/5=600002. I know that's not what you are asking from the mathematical point of view, but from practical point of view it is very helpful.

EDIT: To answer the OP question, my answer is no. There is no mathematical reason one prime can behave better than another one in an algebraic computation. Of course, larger primes are better because there are less coincidences when you ask if $x=0$. But that's it. I am happy to be proven wrong.

Source Link
Anton Mellit
  • 3.8k
  • 12
  • 32

I prefer primes like 1000003 and 1000000007 because it is easy to recognize small integers and rational numbers with small denominators in the output. For instance, modulo 1000003 we have 1/3=666669, -1/3=333334, 1/5=600002. I know that's not what you are asking from the mathematical point of view, but from practical point of view it is very helpful.