Function safe_arch::round_m128d

source ·
pub fn round_m128d<const MODE: i32>(a: m128d) -> m128d
Available with target feature sse4.1 only.
Expand description

Rounds each lane in the style specified.

let a = m128d::from_array([-0.1, 1.6]);
//
assert_eq!(round_m128d::<{ round_op!(Nearest) }>(a).to_array(), [0.0, 2.0]);
//
assert_eq!(round_m128d::<{ round_op!(NegInf) }>(a).to_array(), [-1.0, 1.0]);
//
assert_eq!(round_m128d::<{ round_op!(PosInf) }>(a).to_array(), [0.0, 2.0]);
//
assert_eq!(round_m128d::<{ round_op!(Zero) }>(a).to_array(), [0.0, 1.0]);