◆ nearbyint()

Value boost::simd::nearbyint ( Value const &  x)

This function object computes the rounded to even value of its parameter.

Header <boost/simd/function/nearbyint.hpp>
Notes:
  • If x is \(\pm\infty\), it is returned, unmodified
  • If x is \(\pm0\), it is returned, unmodified
  • If x is NaN, NaN is returned
  • to even means that half integer values are rounded to the nearest even value.
  • This function is in general faster than round which do the rouding on half integer values away from zero.
See also
round, ceil, floor, trunc