|
constexpr TLFLOAT_INLINE | TLFloat ()=default |
|
constexpr TLFLOAT_INLINE | TLFloat (const TLFloat &)=default |
|
constexpr TLFLOAT_INLINE TLFloat & | operator= (const TLFloat &)=default |
|
constexpr TLFLOAT_INLINE Unpacked_t | getUnpacked () const |
|
template<typename mant_t_ , typename longmant_t_ , int nbexp_, int nbmant_> |
constexpr TLFLOAT_INLINE | TLFloat (const detail::UnpackedFloat< mant_t_, longmant_t_, nbexp_, nbmant_ > &tf) |
|
template<typename srctftype > |
constexpr TLFLOAT_INLINE | TLFloat (const TLFloat< srctftype > &s) |
|
template<typename inttype , std::enable_if_t<(std::is_integral_v< inttype >), int > = 0> |
constexpr TLFLOAT_INLINE | TLFloat (const inttype x) |
|
template<typename inttype , std::enable_if_t<(std::is_integral_v< inttype >), int > = 0> |
constexpr TLFLOAT_INLINE | operator inttype () const |
|
template<int N> |
constexpr TLFLOAT_INLINE | TLFloat (const BigInt< N > x) |
|
template<int N> |
constexpr TLFLOAT_INLINE | TLFloat (const BigUInt< N > x) |
|
template<int N> |
constexpr TLFLOAT_INLINE | operator BigInt< N > () const |
|
template<int N> |
constexpr TLFLOAT_INLINE | operator BigUInt< N > () const |
|
constexpr | TLFloat (const double d) |
|
constexpr | TLFloat (const float f) |
|
template<typename fptype , std::enable_if_t<(sizeof(fptype)==sizeof(mant_t) &&(std::is_floating_point_v< fptype >||(!std::is_pointer_v< fptype > &&!std::is_integral_v< fptype >))), int > = 0> |
constexpr TLFLOAT_INLINE | TLFloat (const fptype &s) |
|
template<typename fptype , std::enable_if_t<(sizeof(fptype)==sizeof(mant_t) &&(std::is_floating_point_v< fptype >||(!std::is_pointer_v< fptype > &&!std::is_integral_v< fptype >))), int > = 0> |
constexpr TLFLOAT_INLINE | operator fptype () const |
|
constexpr | TLFloat (const char *ptr, const char **endptr=nullptr) |
|
constexpr TLFLOAT_INLINE | operator Unpacked_t () const |
|
constexpr | operator double () const |
|
constexpr | operator float () const |
|
constexpr TLFLOAT_INLINE TLFloat | operator- () const |
|
constexpr TLFLOAT_INLINE TLFloat | operator+ () const |
|
constexpr TLFloat | operator+ (const TLFloat &rhs) const |
|
constexpr TLFloat | operator- (const TLFloat &rhs) const |
|
constexpr TLFloat | operator* (const TLFloat &rhs) const |
|
constexpr TLFloat | operator/ (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator== (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator!= (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator> (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator< (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator>= (const TLFloat &rhs) const |
|
constexpr TLFLOAT_INLINE bool | operator<= (const TLFloat &rhs) const |
|
template<typename srctype > |
constexpr TLFLOAT_INLINE TLFloat & | operator= (const srctype &s) |
|
template<typename rhstype > |
constexpr TLFLOAT_INLINE TLFloat & | operator+= (const rhstype &rhs) |
|
template<typename rhstype > |
constexpr TLFLOAT_INLINE TLFloat & | operator-= (const rhstype &rhs) |
|
template<typename rhstype > |
constexpr TLFLOAT_INLINE TLFloat & | operator*= (const rhstype &rhs) |
|
template<typename rhstype > |
constexpr TLFloat & | operator/= (const rhstype &rhs) |
|
constexpr TLFLOAT_INLINE TLFloat & | operator++ () |
|
constexpr TLFLOAT_INLINE TLFloat & | operator-- () |
|
constexpr TLFLOAT_INLINE TLFloat | operator++ (int) |
|
constexpr TLFLOAT_INLINE TLFloat | operator-- (int) |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator+ (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator- (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator* (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFloat | operator/ (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator== (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator!= (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator> (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator< (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator>= (const rhstype &rhs) const |
|
template<typename rhstype , std::enable_if_t<(std::is_integral_v< rhstype >||sizeof(rhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator<= (const rhstype &rhs) const |
|
|
template<typename > |
class | TLFloat |
|
constexpr TLFloat | fabs (const TLFloat &u) |
|
constexpr TLFloat | copysign (const TLFloat &x, const TLFloat &y) |
|
constexpr TLFloat | fmax (const TLFloat &x, const TLFloat &y) |
|
constexpr TLFloat | fmin (const TLFloat &x, const TLFloat &y) |
|
constexpr TLFloat | fdim (const TLFloat &x, const TLFloat &y) |
|
constexpr bool | isnan (const TLFloat &u) |
|
constexpr bool | isinf (const TLFloat &u) |
|
constexpr bool | finite (const TLFloat &u) |
|
constexpr int | fpclassify (const TLFloat &u) |
|
constexpr TLFLOAT_INLINE bool | signbit (const TLFloat &u) |
|
constexpr TLFLOAT_INLINE bool | iszero (const TLFloat &u) |
|
constexpr TLFLOAT_INLINE bool | isint (const TLFloat &u) |
|
constexpr TLFLOAT_INLINE bool | iseven (const TLFloat &u) |
|
constexpr TLFloat | fma (const TLFloat &x, const TLFloat &y, const TLFloat &z) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator+ (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator- (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE TLFloat | operator* (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFloat | operator/ (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator== (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator!= (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator> (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator< (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator>= (const lhstype &lhs, const TLFloat &rhs) |
|
template<typename lhstype , std::enable_if_t<(std::is_integral_v< lhstype >||sizeof(lhstype)<=sizeof(mant_t)), int > = 0> |
constexpr TLFLOAT_INLINE bool | operator<= (const lhstype &lhs, const TLFloat &rhs) |
|
constexpr int32_t | ilogb (const TLFloat &f) |
|
constexpr xpair< TLFloat, int > | frexp (const TLFloat &f) |
|
constexpr TLFloat | frexp (const TLFloat &f, int *exp) |
|
constexpr TLFloat | ldexp (const TLFloat &f, int exp) |
|
constexpr TLFloat | sqrt (const TLFloat &d) |
|
constexpr TLFloat | hypot (const TLFloat &x, const TLFloat &y) |
|
constexpr TLFloat | trunc (const TLFloat &d) |
|
constexpr TLFloat | floor (const TLFloat &d) |
|
constexpr TLFloat | ceil (const TLFloat &d) |
|
constexpr TLFloat | round (const TLFloat &d) |
|
constexpr TLFloat | rint (const TLFloat &d) |
|
constexpr TLFloat | modf (const TLFloat &x, TLFloat *iptr) |
|
constexpr TLFloat | nextafter (const TLFloat &x, const TLFloat &y) |
|
template<typename Unpacked_t>
class tlfloat::TLFloat< Unpacked_t >
This is a trivially copyable generic template class that represents an IEEE 754 floating-point number. By adjusting the template parameters, it can represent an IEEE 754 floating-point number of any precision. The data size and data structure of the object are the same as the corresponding floating-point number represented in the IEEE 754 format.