Function safe_arch::reciprocal_m128_s

source ยท
pub fn reciprocal_m128_s(a: m128) -> m128
Available with target feature sse only.
Expand description

Low lane 1.0 / a approximation, other lanes unchanged.

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