Skip to main content

prev_prime

Function prev_prime 

Source
pub fn prev_prime(n: u128) -> Option<u128>
Expand description

Return the largest prime <= n.

Uses the DescendingPrimes iterator starting from n and moving backwards.