Since Rust 1.0, the following should be used:
let upperLimit = (number as f64).sqrt() as i64 + 1;
Or, equivalently:
let upperLimit = f64::sqrt(number) as i64 + 1;
See the docs for f64::sqrt.
Since Rust 1.0, the following should be used:
let upperLimit = (number as f64).sqrt() as i64 + 1;
Or, equivalently:
let upperLimit = f64::sqrt(number) as i64 + 1;
See the docs for f64::sqrt.