Talk:Miller–Rabin primality test: Difference between revisions
Content added Content deleted
(→Run Basic and PureBasic problems with output: Kung Pow: A Fistful of Overflows) |
(Pseudocode) |
||
Line 63: | Line 63: | ||
::::: Given n = 31, if we select a base of 22 then it does x = (22^15) % 31 and gets -8 as the result (instead of 30 = n-1). Similar with base 27. The Pow operation overflows very easily, so the program isn't very useful as written. It needs a powmod using a ladder (see the C deterministic code or the Go code, for examples). [[User:Danaj|Danaj]] ([[User talk:Danaj|talk]]) 07:22, 12 March 2016 (UTC) |
::::: Given n = 31, if we select a base of 22 then it does x = (22^15) % 31 and gets -8 as the result (instead of 30 = n-1). Similar with base 27. The Pow operation overflows very easily, so the program isn't very useful as written. It needs a powmod using a ladder (see the C deterministic code or the Go code, for examples). [[User:Danaj|Danaj]] ([[User talk:Danaj|talk]]) 07:22, 12 March 2016 (UTC) |
||
==Pseudocode in task description== |
|||
The pseudocode includes the line "for r = 1 .. s − 1". Where is r used?--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 17:26, 20 August 2019 (UTC) |