const GOLDEN_RATIO:f32 = 1.6180339887;
const GOLDEN_CONJUGATE:f32 = -0.6180339887;
const FIVE_SQRT:f32 = 2.236067977;//√5
fn fib(n:f32) -> f32 {
    return (GOLDEN_RATIO.powf(n) - GOLDEN_CONJUGATE.powf(n)) / FIVE_SQRT;
}
fn main(){
    let args: Vec<String> = std::env::args().collect();
    let input = args.get(1);
    match input {
        Some (inStr) => {
            match inStr.trim().parse() {
                Ok (n) => {
                    let result = fib(n);
                    println!("fib({}) = {:.2}",n,result);
                },
                Err(err) => println!("can't parse value to float: {}",err)
            }
        },
        None => println!("fib [LIMIT]")
    };
}
