1 unstable release

0.1.0 Jan 7, 2024

#1780 in Algorithms

MIT/Apache

17KB
314 lines

Number-utils


lib.rs:

number-utils

A calculation crate.

Examples

use number_utils::NumberUtils;

let n: u32 = 6;

assert_eq!(n.factorial(), 720);
assert_eq!(n.permutation(3), 120);
assert_eq!(n.combination(3), 20);

assert_eq!(10_u32.factorial().digits(), 7);

Dependencies

~485KB
~11K SLoC