Module future

Module future 

Source
Expand description

§Plans for the Future

This section isn’t really a “guide”, and more of a list of things I plan to add in the future, to my library.

  • High Priority = Expect to see it in the next versions
  • Medium Priority = I will do it eventually.
  • Low Priority = I could do it, but I don’t see why would I.

§High Priority

§Faster is_prime(x)

Currently, this function creates prime data up to the square root of x, then checking if none of the generated primes divide x. Unfortunately, this is way slower than it needs to be. Primality tests like Fermat or, the one I intend to implement, the Miller-Rabin test, are way faster.

§More Rigorous Tests

Currently I’m running integration tests to make sure the data generation is working properly. But most of the other methods PrimeData and PrimeByte have have not been thoroughly tested.

§Medium Priority

§Add a lower_bound() method

Currently, the estimate module only has an upper_bound method.

§Better approximatin function for π(x)

Currently, π(x) approximations are never off by more than 0.5%. They’re actually super good for values greater than u32::MAX, but below that, I’m probably better off using combinatorial methods.

§Low Priority

§Smarter Structs

If your data ranges from 73 to 144, you can’t retrieve primes from 72 to 144, even if it’s obvious that 72 isn’t prime. I could implement a check to see if the values that lie outside of the data range are “obviously prime” (by checking if they’re not coprime with 30).