Function safe_arch::reciprocal_m128

source ·
pub fn reciprocal_m128(a: m128) -> m128
Available with target feature sse only.
Expand description

Lanewise 1.0 / a approximation.

let a = m128::from_array([1.0, 2.0, 4.0, 8.0]);
let b = reciprocal_m128(a).to_array();
let expected = [1.0, 0.5, 0.25, 0.125];
for i in 0..4 {
  assert!((b[i] - expected[i]).abs() < 0.001);
}