fast_sqrt
Calculate the sqrt(x)
Arguments
x
- The number to calculate the sqrt ofiter
- The number of iterations to run the algorithm
Returns
u128
- The sqrt of x with rounding (e.g., sqrt(5) = 2.24 -> 2, sqrt(7) = 2.65 -> 3)
Fully qualified path: alexandria_math::fast_root::fast_sqrt
#![allow(unused)] fn main() { pub fn fast_sqrt(x: u128, iter: usize) -> u128 }