[][src]Macro safe_arch::round_m128d_s

macro_rules! round_m128d_s {
    ($a:expr, $b:expr, Nearest) => { ... };
    ($a:expr, $b:expr, NegInf) => { ... };
    ($a:expr, $b:expr, PosInf) => { ... };
    ($a:expr, $b:expr, Zero) => { ... };
}

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!(a, b, Nearest).to_array(), [0.0, 900.0]);
assert_eq!(round_m128d_s!(a, b, NegInf).to_array(), [-1.0, 900.0]);
//
let b = m128d::from_array([2.4, f64::NAN]);
//
assert_eq!(round_m128d_s!(a, b, PosInf).to_array(), [3.0, 900.0]);
assert_eq!(round_m128d_s!(a, b, Zero).to_array(), [2.0, 900.0]);