aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/integers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/integers.c')
-rw-r--r--src/stdlib/integers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/integers.c b/src/stdlib/integers.c
index b4ca69d3..bb39d99c 100644
--- a/src/stdlib/integers.c
+++ b/src/stdlib/integers.c
@@ -434,12 +434,12 @@ public Int_t Int$next_prime(Int_t x)
#if __GNU_MP_VERSION >= 6
#if __GNU_MP_VERSION_MINOR >= 3
-public Int_t Int$prev_prime(Int_t x)
+public OptionalInt_t Int$prev_prime(Int_t x)
{
mpz_t p;
mpz_init_set_int(p, x);
if (unlikely(mpz_prevprime(p, p) == 0))
- fail("There is no prime number before ", x);
+ return NONE_INT;
return Int$from_mpz(p);
}
#endif