openGPMP
Open Source Mathematics Package
python
nt_ex
Functions
python.nt_ex Namespace Reference
Functions
def
main
()
Function Documentation
◆
main()
def python.nt_ex.main
(
void
)
Definition at line
5
of file
nt_ex.py
.
5
def
main
():
6
p = nt.PrimalityTest()
7
8
prime_0 = p.is_prime(2999)
9
prime_1 = p.carmichael_num(561)
10
print(prime_0)
11
print(prime_1)
12
13
mod_0 = p.mod_pow(3, 2, 2)
14
mod_1 = p.mod_pow(5, 2, 7)
15
print(mod_0)
16
print(mod_1)
17
18
p.miller_rabin(4, 4, 200)
19
20
ss_0 = p.solovoy_strassen(15, 50)
21
ss_1 = p.solovoy_strassen(1049, 50)
22
print(ss_0)
23
print(ss_1)
24
25
python.nt_ex.main
def main()
Definition:
nt_ex.py:5
Generated by
1.9.1