Handbook
Glossary
(solovay-strassen) ( n numtrials -- ? )
Vocabulary
math
.
primes
.
solovay-strassen
.
private
Inputs
n
an
object
numtrials
an
object
Outputs
?
an
object
Definition
USING:
kernel
math
math.extras
math.extras.private
math.functions
random
ranges
sequences
;
IN:
math.primes.solovay-strassen.private
::
(solovay-strassen)
( n numtrials -- ? )
numtrials
<iota>
[
drop
n 1
-
[1..b)
random
:>
a a n
simple-gcd
1
>
[
t
]
[
a n
jacobi
n
mod'
a n 1
-
2
/i
n
^mod
=
not
]
if
]
none?
;