[][src]Function nikisas_test::utils::avoid

pub fn avoid<F: FloatExt>(x: F) -> impl Fn(&F) -> bool

Instructs the iterator to avoid this particular value.

use nikisas_test::prelude::*;
use nikisas_test::utils::avoid;

fn inv(x: f32) -> f32 {
    // your implementation
}

let error = UniformSample::with_count(-4.2e+9, 4.2e+9, 10000)
    .filter(avoid(0.0))
    .error(|x| (inv(x), 1.0 / x));