File: isprime.tc

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.8-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,388 kB
  • sloc: cpp: 7,438,767; ansic: 1,393,871; asm: 1,012,926; python: 241,728; f90: 86,635; objc: 75,411; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (33 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Primality check tests

# Values < 2 are definitionally nonprime.
isprime:-39849281983491823000:$MP_FALSE
isprime:-1:$MP_FALSE
isprime:0:$MP_FALSE
isprime:1:$MP_FALSE

# Various small primes.
isprime:2:$MP_TRUE
isprime:3:$MP_TRUE
isprime:5:$MP_TRUE
isprime:7:$MP_TRUE
isprime:23:$MP_TRUE
isprime:37:$MP_TRUE
isprime:997:$MP_TRUE

# Mersenne primes.
isprime:162259276829213363391578010288127:$MP_TRUE
isprime:170141183460469231731687303715884105727:$MP_TRUE
isprime:6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151:$MP_TRUE

# M11 * 829
isprime:134512940491417878251618170528857283:$MP_FALSE
# M12 * 1013
isprime:172353018845455331744199238664190599101451:$MP_FALSE
# M13 * 65537
isprime:449898244251979768890768832669397267280186981265491806615484951724642943610332184687956191170029747169547068359663480993178863727537429685544664092114807500505087:$MP_FALSE

# NIST CAVP test vectors (RSA key factors).
# http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-2rsatestvectors.zip
isprime:#xe55a8129ca50f0243e06db83063bcf28cd006dc7c8ca269b96c642576a6c27606b57d8395b5c06852f9f1c6bc4be816610335871411733986a64094c115f35e7:$MP_TRUE
isprime:#xed47455771df4e093355ffff707d2bd626ee5afcd7b6b609894d285311c8bebc914f50cf40d33532b5e44a1cab04444b474e9f843e018efe425ee8e3e8521101:$MP_TRUE