fn compute_sqrt(x: f64) -> f64 {
    let mut guess: f64 = 1.0;

    for _ in 0..10 {
        guess = 0.5 * (guess + x / guess);
    }

    guess
}
/// computes the square root of a number using 10 iterations of [Newton's method]
/// 
/// # Arguments
/// * `x` - the number to find the root of
/// 
/// [Newton's method]: https://en.wikipedia.org/wiki/Newton%27s_method#Square_root
computes the square root of a number using 10 iterations of [Newton's method]
computes the square root of a number using 10 iterations of [ Newton ' s method ]
fn compute_sqrt(x: f64) -> f64 {
    let mut guess: f64 = 1.0;
    for _ in 0..10 {
        guess = 0.5 * (guess + x / guess);
    }
    guess
}
fn compute_sqrt ( x : f64 ) -> f64 { let mut guess : f64 = 1.0 ; for _ in 0 .. 10 { guess = 0.5 * ( guess + x / guess ) ; } guess }
computes the square root of a number using 10 iterations of [Newton's method]
computes the square root of a number using 10 iterations of [ Newton ' s method ]
x
f64
x
f64