|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
#include <cstdint>#include <universal/behavior/arithmetic.hpp>#include <universal/number/efloat/efloat.hpp>#include <universal/number/efloat/mathlib.hpp>#include <math/constexpr_math.hpp>Namespaces | |
| namespace | sw |
| required std libraries | |
| namespace | sw::universal |
| namespace | sw::universal::lns_rounding |
Typedefs | |
| using | sw::universal::lns_rounding::E = efloat<72> |
Functions | |
| template<typename Lns> | |
| constexpr E | sw::universal::lns_rounding::exponentOf (const Lns &v) |
| template<typename Lns> | |
| constexpr int64_t | sw::universal::lns_rounding::exponentOf64 (const Lns &v) |
| template<typename Lns> | |
| constexpr void | sw::universal::lns_rounding::writeField (Lns &v, E r, bool negative) |
| template<typename Lns> | |
| constexpr void | sw::universal::lns_rounding::encode (const E &n, bool negative, Lns &v) |
| template<typename Lns> | |
| constexpr void | sw::universal::lns_rounding::encode64 (int64_t k, bool negative, Lns &v) |
| template<typename Evaluate, typename Margin> | |
| constexpr E | sw::universal::lns_rounding::nearestByZiv (Evaluate &&evaluate, Margin &&margin, unsigned startBits) |
| constexpr double | sw::universal::lns_rounding::roundHalfUp (double x) |
| template<typename Lns> | |
| constexpr Lns & | sw::universal::lns_rounding::addsub (Lns &lhs, const Lns &rhs, bool subtract) |
| template<typename Lns> | |
| Lns | sw::universal::lns_rounding::exponential (char f, const Lns &x) |
Variables | |
| constexpr unsigned | sw::universal::lns_rounding::zivCap = 2048 |