Function safe_arch::reciprocal_sqrt_m128
source · pub fn reciprocal_sqrt_m128(a: m128) -> m128
Expand description
Lanewise 1.0 / sqrt(a)
approximation.
let a = m128::from_array([16.0, 9.0, 4.0, 25.0]);
let b = reciprocal_sqrt_m128(a).to_array();
let expected = [0.25, 0.33333, 0.5, 0.2];
for i in 0..4 {
assert!((b[i] - expected[i]).abs() < 0.001);
}