Miller–Rabin primality test: Difference between revisions

Replace `for r` loop with `repeat` loop, since `r` is not used in loop body.
(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
'''forrepeat''' ''r'' = 1 .. ''s'' − 1 times:
''x'' ← ''x''<sup>2</sup> mod ''n''
'''if''' ''x'' = 1 '''then''' '''return''' ''composite''
1,479

edits