Crate fixedpoint [] [src]

FixedPoint

A simple library for computing the fixed point of a given function

Example

extern crate fixedpoint;

use fixedpoint::fixedpoint;

fn func_with_fixed_point(num: u32, param: &u32) -> u32 {
    150 + (((num as f32 / param.clone() as f32).ceil() as u32)*100)
}

fn main() {
     let val = fixedpoint(&func_with_fixed_point, 0, &150, None, None).unwrap();
     println!("Fixed Point of function exists at: {}", val);
}

Modules

errors

Functions

fixedpoint

Compute the fixed point of a given function