Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
truncate.hpp File Reference
#include <cmath>
#include <type_traits>
#include <universal/number/faithful/core.hpp>
#include <universal/numerics/twosum.hpp>

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::faithful_detail

Functions

template<typename Real>
faithful< Real > sw::universal::faithful_detail::canonical (const faithful< Real > &x)
template<typename FloatingPointType>
requires std::is_floating_point_v<FloatingPointType>
faithful< FloatingPointType > sw::universal::floor (const faithful< FloatingPointType > &x)
template<typename FloatingPointType>
requires std::is_floating_point_v<FloatingPointType>
faithful< FloatingPointType > sw::universal::ceil (const faithful< FloatingPointType > &x)
template<typename FloatingPointType>
requires std::is_floating_point_v<FloatingPointType>
faithful< FloatingPointType > sw::universal::trunc (const faithful< FloatingPointType > &x)
template<typename FloatingPointType>
requires std::is_floating_point_v<FloatingPointType>
faithful< FloatingPointType > sw::universal::round (const faithful< FloatingPointType > &x)