Task

Create a program that finds and outputs the roots of a given function, range and (if applicable) step width.

The program should identify whether the root is exact or approximate.



For this task, use:      ƒ(x)   =   x3 - 3x2 + 2x 

// 202100315 Rust programming solution
 
use roots::find_roots_cubic;
 
fn main() {
 
   let roots = find_roots_cubic(1f32, -3f32, 2f32, 0f32);
 
   println!("Result : {:?}", roots);
}