Function sqrt

Source
pub fn sqrt(x: f64) -> f64
Expand description

§sqrt(x)

Native Function

The sqrt function returns the square root of a given number, which is the number that, when multiplied by itself, equals the original input.

§Examples

use mathlab::math::{sqrt, INF_F64};
assert_eq!(sqrt(0.0), 0.0);
assert_eq!(sqrt(0.01), 0.1);
assert_eq!(sqrt(1.0), 1.0);
assert_eq!(sqrt(4.0), 2.0);
assert_eq!(sqrt(9.0), 3.0);
assert_eq!(sqrt(100.0), 10.0);
assert_eq!(sqrt(INF_F64), INF_F64);

End Fun Doc