Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
hfloat_impl.hpp File Reference
#include <universal/utility/exceptions_check.hpp>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <limits>
#include <string>
#include <string_view>
#include <type_traits>
#include <algorithm>
#include <universal/native/ieee754_core.hpp>
#include <universal/utility/decimal_to_binary.hpp>
#include <universal/number/shared/nan_encoding.hpp>
#include <universal/number/shared/infinite_encoding.hpp>
#include <universal/number/shared/specific_value_encoding.hpp>
#include <universal/number/hfloat/hfloat_fraction.hpp>
#include <universal/native/constexpr_ldexp.hpp>
#include <universal/number/hfloat/exceptions.hpp>

Classes

class  sw::universal::hfloat< _ndigits, _es, bt >

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal

Macros

#define HFLOAT_ENABLE_LITERALS   1
#define HFLOAT_THROW_ARITHMETIC_EXCEPTION   0
#define HFLOAT_EXCEPT   noexcept

Functions

template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::abs (const hfloat< ndigits, es, BlockType > &)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::fabs (hfloat< ndigits, es, BlockType >)
template<unsigned ndigits, unsigned es, typename BlockType>
bool sw::universal::parse (const std::string &number, hfloat< ndigits, es, BlockType > &v)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator== (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator!= (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator< (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator> (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator<= (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator>= (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator== (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator!= (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator< (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator> (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator<= (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator>= (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator== (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator!= (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator< (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator> (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator<= (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr bool sw::universal::operator>= (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator+ (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator- (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator* (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator/ (const hfloat< ndigits, es, BlockType > &lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator+ (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator- (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator* (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator/ (const hfloat< ndigits, es, BlockType > &lhs, const double rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator+ (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator- (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator* (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)
template<unsigned ndigits, unsigned es, typename BlockType>
constexpr hfloat< ndigits, es, BlockType > sw::universal::operator/ (const double lhs, const hfloat< ndigits, es, BlockType > &rhs)

Macro Definition Documentation

◆ HFLOAT_ENABLE_LITERALS

#define HFLOAT_ENABLE_LITERALS   1

◆ HFLOAT_EXCEPT

#define HFLOAT_EXCEPT   noexcept

◆ HFLOAT_THROW_ARITHMETIC_EXCEPTION

#define HFLOAT_THROW_ARITHMETIC_EXCEPTION   0