#math #safe #pure #traits #gcd #prime #type

polymatheia

Mathematical types, traits, and algorithms in pure and safe Rust

8 releases (4 breaking)

0.4.3 Nov 10, 2023
0.4.2 Nov 10, 2023
0.3.0 Nov 6, 2023
0.2.0 Nov 6, 2023
0.0.0 Nov 2, 2023

#1350 in Algorithms

Download history 8/week @ 2024-02-16 48/week @ 2024-02-23 10/week @ 2024-03-01 69/week @ 2024-03-29

69 downloads per month

MIT/Apache

24KB
481 lines

Mathematical types, traits, and algorithms in pure and safe Rust.

The crate's name, polymatheia, means "much knowledge" in ancient greek.

The goals of this crate are, with decreasing priority:

  1. Having fun. This is a recreational project.
  2. Correctness. This implies that all items should be tested.
  3. Cleanliness. The code should be simple and elegant.
  4. Independence. The crate should only depend on the std library.

The crate currently implements:

  • Euclidean GCD algorithm
  • Fibonacci sequence generation
  • Rational numbers
  • Sieve of Eratosthenes prime generation and factorization

No runtime deps