benford
This crate provides a way to test if some given set of numbers conforms to Benford's law
Currently, only the first digit is being used. You can use your own method
of mapping a number to a digit, by implementing [BenfordClass]
Example 1: Fibonacci numbers are Benford ...
use ;
let mut tester = default;
let mut fibonacci = default;
for val in fibonacci
assert!;
Example 2: ... but only with limited confidence
if your test set is too small
use ;
let mut tester = default;
let mut fibonacci = default;
for val in fibonacci
assert!;
assert!;
Example 3: Natural numbers are not Benford
use ;
let mut tester = default;
for val in 1..u16MAX
assert!
License: GPL-3.0