xtensor
Loading...
Searching...
No Matches
Nearest integer floating point operations

Functions

template<class E >
auto xt::ceil (E &&e) noexcept -> detail::xfunction_type_t< math::ceil_fun, E >
 ceil function.
 
template<class E >
auto xt::floor (E &&e) noexcept -> detail::xfunction_type_t< math::floor_fun, E >
 floor function.
 
template<class E >
auto xt::trunc (E &&e) noexcept -> detail::xfunction_type_t< math::trunc_fun, E >
 trunc function.
 
template<class E >
auto xt::round (E &&e) noexcept -> detail::xfunction_type_t< math::round_fun, E >
 round function.
 
template<class E >
auto xt::nearbyint (E &&e) noexcept -> detail::xfunction_type_t< math::nearbyint_fun, E >
 nearbyint function.
 
template<class E >
auto xt::rint (E &&e) noexcept -> detail::xfunction_type_t< math::rint_fun, E >
 rint function.
 

Detailed Description

Function Documentation

◆ ceil()

template<class E >
auto xt::ceil ( E && e) -> detail::xfunction_type_t<math::ceil_fun, E>
inlinenoexcept

ceil function.

Returns an xfunction for the element-wise smallest integer value not less than e.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1577 of file xmath.hpp.

◆ floor()

template<class E >
auto xt::floor ( E && e) -> detail::xfunction_type_t<math::floor_fun, E>
inlinenoexcept

floor function.

Returns an xfunction for the element-wise smallest integer value not greater than e.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1592 of file xmath.hpp.

◆ nearbyint()

template<class E >
auto xt::nearbyint ( E && e) -> detail::xfunction_type_t<math::nearbyint_fun, E>
inlinenoexcept

nearbyint function.

Returns an xfunction for the element-wise rounding of e to integer values in floating point format, using the current rounding mode. nearbyint never raises FE_INEXACT error.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1639 of file xmath.hpp.

◆ rint()

template<class E >
auto xt::rint ( E && e) -> detail::xfunction_type_t<math::rint_fun, E>
inlinenoexcept

rint function.

Returns an xfunction for the element-wise rounding of e to integer values in floating point format, using the current rounding mode. Contrary to nearbyint, rint may raise FE_INEXACT error.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1655 of file xmath.hpp.

◆ round()

template<class E >
auto xt::round ( E && e) -> detail::xfunction_type_t<math::round_fun, E>
inlinenoexcept

round function.

Returns an xfunction for the element-wise nearest integer value to e, rounding halfway cases away from zero, regardless of the current rounding mode.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1623 of file xmath.hpp.

◆ trunc()

template<class E >
auto xt::trunc ( E && e) -> detail::xfunction_type_t<math::trunc_fun, E>
inlinenoexcept

trunc function.

Returns an xfunction for the element-wise nearest integer not greater in magnitude than e.

Parameters
ean xexpression
Returns
an xfunction

Definition at line 1607 of file xmath.hpp.