[−][src]Macro safe_arch::round_m128_s
Rounds $b
low as specified, other lanes use $a
.
let a = m128::from_array([f32::NAN, 6.0, 7.0, 8.0]); // let b = m128::from_array([-0.1, f32::NAN, f32::NAN, f32::NAN]); // assert_eq!(round_m128_s!(a, b, Nearest).to_array(), [0.0, 6.0, 7.0, 8.0]); assert_eq!(round_m128_s!(a, b, NegInf).to_array(), [-1.0, 6.0, 7.0, 8.0]); // let b = m128::from_array([2.4, f32::NAN, f32::NAN, f32::NAN]); // assert_eq!(round_m128_s!(a, b, PosInf).to_array(), [3.0, 6.0, 7.0, 8.0]); assert_eq!(round_m128_s!(a, b, Zero).to_array(), [2.0, 6.0, 7.0, 8.0]);