c-prime 0.1.3

Convenience wrapper for machine-prime
Documentation
//! Convenience wrapper for machine-prime. Implements primality testing for all primitive types, including floats. 
//! Provides iterators and const functions, and modeling of prime sets. 
//! Primes here are defined as integers that can only be composed of themselves and a unit of the integers {1,-1}.
//! Therefore numbers with no factor P are primes as well as -P.
//! ```
//!   use c_prime::{P,Primality,prime_array,prime_inv_array};
//!   
//!   // The set of P contains 17
//!   assert_eq!(P.contains(17),true);
//!
//!   // Go to 2^128-1000 and count the primes from there up to 2^128
//!   assert_eq!(P.jump_to(u128::MAX-999).count(),9);
//!  // Count the number of primes under 100
//!   assert_eq!(P.take_while(|x| *x < 100).count(),25);
//!
//!  // Set intersection of the primes and some collection
//!   assert_eq!(P.intersection([2,4,5,6,7]),[2,5,7]);
//! 
//!  // The first 25 primes greater than 100
//! const ODD_PRIMES : [u128;25] = prime_array(100);
//! // The multiplicative inverses of these primes
//! const PRIME_INV : [u128;25] = prime_inv_array(100);
//! // P*P^-1 = 1
//! for (p,inv) in ODD_PRIMES.iter().zip(PRIME_INV.iter()){
//!       assert_eq!(p.wrapping_mul(*inv),1)
//!  }
//!   // Of course floats can also be primes so long as they can accurately store them
//!   // Here the value is prime so strong case is faster at evaluating it
//!   assert!(4294967291f64.strong_case());
//!  // Another strong case
//!  assert!(!(10570841f64*10570849f64).strong_case());
//! ```

//#![feature(generic_const_items)]

pub(crate) mod ptrait;
pub(crate) mod func;
pub(crate) mod prim;
pub(crate) mod sets;
pub(crate) mod iterators;


pub use crate::ptrait::Primality;
pub use crate::func::*;
pub use crate::iterators::*;
pub use crate::sets::*;