TLFloat
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions
tlfloat.hpp File Reference
#include <cstdio>
#include <tlfloat/bigint.hpp>
Include dependency graph for tlfloat.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  tlfloat::TLFloat< Unpacked_t >
 

Namespaces

namespace  tlfloat
 TLFloat library defines all C++ classes and functions in tlfloat namespace.
 

Macros

#define TLFLOAT_FP_NAN   0
 
#define TLFLOAT_FP_INFINITE   1
 
#define TLFLOAT_FP_ZERO   2
 
#define TLFLOAT_FP_SUBNORMAL   3
 
#define TLFLOAT_FP_NORMAL   4
 
#define TLFLOAT_FP_ILOGB0   ((int)0x80000000)
 
#define TLFLOAT_FP_ILOGBNAN   ((int)2147483647)
 

Typedefs

typedef TLFloat< detail::UnpackedFloat< uint16_t, uint32_t, 8, 7 > > tlfloat::BFloat16
 This class represents a BFloat16 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 
typedef TLFloat< detail::UnpackedFloat< uint16_t, uint32_t, 5, 10 > > tlfloat::Half
 This class represents a half-precision IEEE 754 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 
typedef TLFloat< detail::UnpackedFloat< uint32_t, uint64_t, 8, 23 > > tlfloat::Float
 This class represents a single-precision IEEE 754 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 
typedef TLFloat< detail::UnpackedFloat< uint64_t, BigUInt< 7 >, 11, 52 > > tlfloat::Double
 This class represents a double-precision IEEE 754 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 
typedef TLFloat< detail::UnpackedFloat< BigUInt< 7 >, BigUInt< 8 >, 15, 112 > > tlfloat::Quad
 This class represents a quadruple-precision IEEE 754 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 
typedef TLFloat< detail::UnpackedFloat< BigUInt< 8 >, BigUInt< 9 >, 19, 236 > > tlfloat::Octuple
 This class represents a octuple-precision IEEE 754 floating-point number. The data size and data structure of the objects are the same as the corresponding floating-point number.
 

Functions

template<typename Unpacked_t >
static std::string tlfloat::to_string (TLFloat< Unpacked_t > a, int d=6)
 
template<typename Unpacked_t >
static std::ostream & tlfloat::operator<< (std::ostream &os, const TLFloat< Unpacked_t > &a)
 

Macro Definition Documentation

◆ TLFLOAT_FP_ILOGB0

#define TLFLOAT_FP_ILOGB0   ((int)0x80000000)

◆ TLFLOAT_FP_ILOGBNAN

#define TLFLOAT_FP_ILOGBNAN   ((int)2147483647)

◆ TLFLOAT_FP_INFINITE

#define TLFLOAT_FP_INFINITE   1

◆ TLFLOAT_FP_NAN

#define TLFLOAT_FP_NAN   0

◆ TLFLOAT_FP_NORMAL

#define TLFLOAT_FP_NORMAL   4

◆ TLFLOAT_FP_SUBNORMAL

#define TLFLOAT_FP_SUBNORMAL   3

◆ TLFLOAT_FP_ZERO

#define TLFLOAT_FP_ZERO   2