Expand description
A high-performance engine for working with factorials symbolically.
Rather than computing n! directly (which overflows for even
moderately sized n), this crate uses Legendre’s Formula to derive
the prime factorization of n! — a symbolic representation such as
2^47 × 3^22 × 5^12 × ... — without ever materializing the enormous
integer value itself. This makes the engine fast and immune to
overflow.
The crate also provides a reverse_factorial function to invert the
process: given a value, determine which n (if any) satisfies n! == value.
Structs§
- Factorial
Engine - An engine for computing the symbolic (prime-factorized) form of
n!. - Symbolic
Factorial - The prime factorization of
n!, expressed as{prime: exponent}pairs.
Enums§
- Factorial
Error - Errors that can occur while working with factorials.
Functions§
- reverse_
factorial - Finds the integer
nsuch thatn! == value, if one exists.