num-prime 0.5.0

Generic and optimized primality test, factorization and various number theoretic functions with arbitrary precision based on `num`.
Documentation
1
2
3
4
5
6
7
8
9
pub const fn div_ceil_u64(lhs: u64, rhs: u64) -> u64 {
    let d = lhs / rhs;
    let r = lhs % rhs;
    if r > 0 {
        d + 1
    } else {
        d
    }
}