/oss · 1 merged

uutils/num-prime

A Rust library for prime tests, factorization and other number theory, used by the uutils factor tool.

the project on GitHub (opens in a new tab)
  1. 9 Nov 2026

    Factorizing zero now stops with a clear message

    What was broken
    Asking for the prime factors of zero crashed with a confusing overflow error in debug builds, and in release builds quietly returned a wrong answer.
    What I changed
    The library now stops with a clear message saying zero has no factorization, and its documentation says so.
    Why it matters
    A program can no longer get a wrong result from zero without noticing.

    see the code, #148 (opens in a new tab)

← every project