Crate bmath

source ·
Expand description

This crate contains code written by Bradley Solliday for the purpose of learning rust, demoing cool ideas, and getting better at programming more generally.

The coolest things in the crate at the moment are:
-The implementation of the sturct PCache for efficiently calculating prime numbers.
-The method CFrac::convergents() for calculating the convergents of continued fractions, which are the “best rational approximations of the second kind” of a given real number. This also ties in to the fibonacci numbers. Make sure to check out the source code.

Modules§

  • A couple functions for calculating gcd’s

Structs§

  • A sequence of integers [a0; a1, a2, a3, …] where all but the first element must be positive.
  • An object for calculating and caching consecutive prime numbers