Structs§
- Pythagorean
Triplet Generator Deprecated - Deprecated. Please use PythagoreanTripletGenerator2 instead.
- Pythagorean
Triplet Generator2 - An iterator that generates all primitive Pythagorean triplets which satisfy a given condition.
Functions§
- chinese_
remainder - Chinese remainder theorem for two moduli.
- divisor_
sigma - Divisor sigma function, which includes the count and sum of divisors.
- factorize
- Prime factorization.
- is_
lucas_ probable_ prime - Strong Lucas probable prime test.
- is_
palindrome - Tests if the given number is palindrome in the given base.
- is_
prime - Baillie-PSW primality test.
- is_
strong_ probable_ prime - Strong Fermat probable prime test with base 2 for odd
n >= 3. - jacobi_
symbol - Jacobi symbol
(a/n). The value is one of-1, 0, 1, which is represented as respectiveSign. - mod_inv
- Modular inverse of a modulo m.
- mod_
inv_ range - An O(poly(log m)) algorithm to find the smallest x that satisfies
left <= a*x <= right (mod m). - mod_
inv_ sieve - Modular inverses of 1..a modulo m.
- mul_mod
- Modulo multiplication;
x*y mod m. - next_
prime - Calculates the smallest prime greater than n.
- nth_
prime - Calculates the nth prime.
- pow_mod
- Modulo power;
n^p mod m. - pythagorean_
like_ triples Deprecated - Creates a Pythagorean-like triplet generator with a custom starting triple.
- pythagorean_
like_ triples2 - Creates a Pythagorean-like triplet generator with a custom starting triple and a filtering function.
- pythagorean_
triples Deprecated - Creates a Pythagorean triplet generator with the starting triple of (3, 4, 5).
- pythagorean_
triples2 - Creates a Pythagorean triplet generator with the starting triple of (3, 4, 5) and a filtering function.