#numbers #factorial #compile-time #macro #fact #upto #precalculated

bigfactorial

Precalculated compile-time factorial macro for numbers upto 99

2 releases

0.1.2 Jan 24, 2021
0.1.1 Jan 24, 2021

#2816 in Rust patterns

MIT license

12KB
122 lines

bigfactorial

Tiny compile-time macro for calculating factorial of numbers upto 99 with num_bigint.

Results are shipped precalculated.

usage

use bigfactorial::fact;
use num_bigint::BigInt;

fact!(45)?; // Bigint(119622220865480194561963161495657715064383733760000000000)

license

MIT license

No runtime deps