| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#ifndef MPU_PRIME_POWERS_H |
|
2
|
|
|
|
|
|
|
#define MPU_PRIME_POWERS_H |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
#include "ptypes.h" |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
/* returns power */ |
|
7
|
|
|
|
|
|
|
extern int prime_power(UV n, UV* prime); |
|
8
|
12449
|
|
|
|
|
|
static INLINE bool is_prime_power(UV n) { return !!prime_power(n,0); } |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extern UV next_prime_power(UV x); |
|
11
|
|
|
|
|
|
|
extern UV prev_prime_power(UV x); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
extern UV prime_power_sieve2(UV** list, UV lo, UV hi); /* p^e with e >= 2 */ |
|
14
|
|
|
|
|
|
|
extern UV prime_power_sieve(UV** list, UV lo, UV hi); /* p^e with e >= 1 */ |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extern UV prime_power_count_range(UV lo, UV hi); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
extern UV prime_power_count(UV n); |
|
19
|
|
|
|
|
|
|
extern UV prime_power_count_lower(UV n); |
|
20
|
|
|
|
|
|
|
extern UV prime_power_count_upper(UV n); |
|
21
|
|
|
|
|
|
|
extern UV prime_power_count_approx(UV n); |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
extern UV nth_prime_power(UV n); |
|
24
|
|
|
|
|
|
|
extern UV nth_prime_power_lower(UV n); |
|
25
|
|
|
|
|
|
|
extern UV nth_prime_power_upper(UV n); |
|
26
|
|
|
|
|
|
|
extern UV nth_prime_power_approx(UV n); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#endif |