| line |
true |
false |
branch |
|
18
|
0 |
1 |
case 2: return urandomb(ctx,1) ? 2 : 3; |
|
19
|
0 |
1 |
case 3: return urandomb(ctx,1) ? 5 : 7; |
|
20
|
0 |
1 |
case 4: return urandomb(ctx,1) ? 11 : 13; |
|
29
|
7 |
57 |
if (start) |
|
32
|
0 |
57 |
if (b > BITS_PER_WORD) |
|
39
|
57 |
518 |
if (is_prob_prime(n)) |
|
47
|
0 |
16 |
if (d == 0) return 0; |
|
48
|
1 |
15 |
if (d == 1) return nth_prime(1 + urandomm32(ctx,4)); |
|
49
|
1 |
14 |
if (d == 2) return nth_prime(5 + urandomm32(ctx,21)); |
|
50
|
3 |
11 |
if (d >= (BITS_PER_WORD == 64 ? 20 : 10)) return 0; |
|
55
|
11 |
72 |
if (is_prob_prime(n)) |
|
63
|
2 |
11025 |
if (lo > hi) return 0; |
|
65
|
19 |
11006 |
lo = (lo <= 2) ? 2 : next_prime(lo-1); |
|
66
|
11025 |
0 |
hi = (hi >= MPU_MAX_PRIME) ? MPU_MAX_PRIME : prev_prime(hi+1); |
|
67
|
4 |
11021 |
if (lo > hi) return 0; |
|
69
|
11004 |
17 |
if (!(lo&1)) lo--; /* treat 2 as 1 */ |
|
73
|
25604 |
3232 |
if (n == 1 || is_prob_prime(n)) |
|
|
7789 |
17815 |
if (n == 1 || is_prob_prime(n)) |
|
74
|
7789 |
3232 |
return (n == 1) ? 2 : n; |
|
81
|
0 |
4 |
if (k >= 3*(n/4)) |
|
85
|
19 |
3 |
while (k--) { |
|
87
|
1 |
18 |
if (!is_strong_pseudoprime(n, base)) |
|
97
|
9 |
0 |
if (b < 4 || b > BITS_PER_WORD) |
|
|
0 |
9 |
if (b < 4 || b > BITS_PER_WORD) |
|
117
|
0 |
2 |
} while (n < min || n > max); |
|
|
0 |
2 |
} while (n < min || n > max); |
|
125
|
8 |
0 |
if (b < 3 || b > BITS_PER_WORD) |
|
|
0 |
8 |
if (b < 3 || b > BITS_PER_WORD) |
|
143
|
4 |
3 |
} while (!is_semiprime(n)); |
|
153
|
4 |
0 |
if (bits < 3 || bits > BITS_PER_WORD) |
|
|
0 |
4 |
if (bits < 3 || bits > BITS_PER_WORD) |
|
173
|
11 |
78 |
(p%7) == 0 || (p%7) == 3 || |
|
|
11 |
67 |
(p%7) == 0 || (p%7) == 3 || |
|
174
|
441 |
89 |
!is_prob_prime(p) || !is_prob_prime(q) ); |
|
|
55 |
12 |
!is_prob_prime(p) || !is_prob_prime(q) ); |
|
|
10 |
2 |
!is_prob_prime(p) || !is_prob_prime(q) ); |