Function round_m128d_s
pub fn round_m128d_s<const MODE: i32>(a: m128d, b: m128d) -> m128d
Available on crate feature
dep_safe_arch
only.Expand description
Rounds $b
low as specified, keeps $a
high.
let a = m128d::from_array([f64::NAN, 900.0]);
//
let b = m128d::from_array([-0.1, f64::NAN]);
//
assert_eq!(round_m128d_s::<{ round_op!(Nearest) }>(a, b).to_array(), [0.0, 900.0]);
assert_eq!(round_m128d_s::<{ round_op!(NegInf) }>(a, b).to_array(), [-1.0, 900.0]);
//
let b = m128d::from_array([2.4, f64::NAN]);
//
assert_eq!(round_m128d_s::<{ round_op!(PosInf) }>(a, b).to_array(), [3.0, 900.0]);
assert_eq!(round_m128d_s::<{ round_op!(Zero) }>(a, b).to_array(), [2.0, 900.0]);