Miller–Rabin primality test: Difference between revisions

m
Line 1,517:
For 35, D=17,S=1
Trial 1,A= 12,X= 17=MOD(2218611106740436992,35)=17
35 F
</pre>
In this run, 32-bit integers falter for 19 in calculating 17<sup>9</sup>, and 64-bit integers falter for 31 with 19<sup>15</sup> by showing a negative number. Other 64-bit overflows however do not show a negative (as with 23<sup>15</sup>) because there is about an even chance that the high-order bit will be on or off. The compiler option for checking integer overflow does not report such faults with 64-bit integers, at least with the Compaq F90/95 compiler.
1,220

edits