Miller–Rabin primality test: Difference between revisions
Replace `for r` loop with `repeat` loop, since `r` is not used in loop body.
Alextretyak (talk | contribs) (Added 11l) |
(Replace `for r` loop with `repeat` loop, since `r` is not used in loop body.) |
||
Line 15:
''x'' ← ''a''<sup>''d''</sup> mod ''n''
'''if''' ''x'' = 1 or ''x'' = ''n'' − 1 '''then''' '''do''' '''next''' LOOP
'''
''x'' ← ''x''<sup>2</sup> mod ''n''
'''if''' ''x'' = 1 '''then''' '''return''' ''composite''
|