Commit 2024-10-23 07:27 11c09b70

View on Github →

feat: more tail recursion when finding Mersenne primes (#16168) Previously the failure at (mersenne 9689).Prime was a stack overflow in a norm_num helper function. Making the relevant function tail-recursive solves that. We now fail with (kernel) deep recursion detected, at an apparently system dependent step:

  • in CI, we still fail at mersenne 9689 (just with a different error)
  • on my machine we now succeed at 9689 and 9941, then fail at 11213.

Estimated changes