Crate primefactor[][src]

Module for factorizing integers

Structs

IntFactor
PrimeFactors
PrimeFactorsIter

IntFactor interator

Functions

primefactor_gcd

Calculate the Greatest common divisor (GCD) between 2 unsigned integers

u128_gcd

Calculate the Greatest common divisor (GCD) between 2 unsigned integers. Based on Euclid’s algorithm pseudo code at: https://en.wikipedia.org/wiki/Euclidean_algorithm

u128_is_prime

Test if the value is a prime number, or not

u128_lcm

Calculate the Least common multiple (LCM) for 2 integers

u128_sqrt

Unsigned 128-bit integer square root calculation. Based on example implementation in C at: https://en.wikipedia.org/wiki/Integer_square_root