diff options
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/integers.c | 4 | ||||
| -rw-r--r-- | stdlib/integers.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/stdlib/integers.c b/stdlib/integers.c index c4fcdfb5..4d5d0a80 100644 --- a/stdlib/integers.c +++ b/stdlib/integers.c @@ -409,6 +409,8 @@ public Int_t Int$next_prime(Int_t x) return Int$from_mpz(p); } +#if __GNU_MP_VERSION >= 6 +#if __GNU_MP_VERSION_MINOR >= 3 public Int_t Int$prev_prime(Int_t x) { mpz_t p; @@ -417,6 +419,8 @@ public Int_t Int$prev_prime(Int_t x) fail("There is no prime number before %k", (Text_t[1]){Int$as_text(&x, false, &Int$info)}); return Int$from_mpz(p); } +#endif +#endif public Int_t Int$choose(Int_t n, Int_t k) { diff --git a/stdlib/integers.h b/stdlib/integers.h index 3bc3abeb..e0586882 100644 --- a/stdlib/integers.h +++ b/stdlib/integers.h @@ -142,7 +142,11 @@ Int_t Int$slow_negative(Int_t x); Int_t Int$slow_negated(Int_t x); bool Int$is_prime(Int_t x, Int_t reps); Int_t Int$next_prime(Int_t x); +#if __GNU_MP_VERSION >= 6 +#if __GNU_MP_VERSION_MINOR >= 3 Int_t Int$prev_prime(Int_t x); +#endif +#endif Int_t Int$choose(Int_t n, Int_t k); Int_t Int$factorial(Int_t n); |
