Nearest integer floating point operations¶
-
template<class
B
>
batch_type_t<B>xsimd
::
ceil
(const simd_base<B> &x)¶ Computes the batch of smallest integer values not less than scalars in
x
.- Return
the batch of smallest integer values not less than
x
.- Parameters
x
: batch of floating point values.
-
template<class
B
>
batch_type_t<B>xsimd
::
floor
(const simd_base<B> &x)¶ Computes the batch of largest integer values not greater than scalars in
x
.- Return
the batch of largest integer values not greater than
x
.- Parameters
x
: batch of floating point values.
-
template<class
B
>
batch_type_t<B>xsimd
::
trunc
(const simd_base<B> &x)¶ Computes the batch of nearest integer values not greater in magnitude than scalars in
x
.- Return
the batch of nearest integer values not greater in magnitude than
x
.- Parameters
x
: batch of floating point values.
-
template<class
B
>
batch_type_t<B>xsimd
::
round
(const simd_base<B> &x)¶ Computes the batch of nearest integer values to scalars in
x
(in floating point format), rounding halfway cases away from zero, regardless of the current rounding mode.- Return
the batch of nearest integer values.
- Parameters
x
: batch of flaoting point values.