![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cFloatDeco.h>
Public Member Functions | |
cFloatDeco () noexcept | |
cFloatDeco (UINT64 uMan, int iExp2) noexcept | |
cFloatDeco (double d) noexcept | |
cFloatDeco | operator- (const cFloatDeco &rhs) const |
cFloatDeco | operator* (const cFloatDeco &rhs) const |
cFloatDeco | Normalize () const |
void | NormalizedBoundaries (cFloatDeco *minus, cFloatDeco *plus) const |
Static Public Member Functions | |
static unsigned | GetCountDecimalDigit32 (UINT32 n) noexcept |
static cFloatDeco __stdcall | GetCachedPower (int nExp2, OUT int *pnExp10) |
static double __stdcall | toDouble (UINT32 frac1, UINT32 frac2, int nExp10) |
static void __stdcall | GrisuRound (char *pszOut, StrLen_t len, UINT64 delta, UINT64 rest, UINT64 ten_kappa, UINT64 wp_w) |
static StrLen_t __stdcall | Grisu2 (double dVal, char *pszOut, OUT int *pnExp10) |
static StrLen_t __stdcall | MantRound (char *pszOut, StrLen_t nMantLength) |
static StrLen_t __stdcall | MantAdjust (char *pszOut, StrLen_t nMantLength, StrLen_t nMantLengthNew) |
static StrLen_t __stdcall | FormatE (char *pszOut, StrLen_t nMantLength, int nExp10, char chE) |
static StrLen_t __stdcall | FormatF (char *pszOut, StrLen_t nMantLength, int nExp10, int iDecPlacesWanted) |
Public Attributes | |
UINT64 | m_uMant |
Hold Mantissa. More... | |
int | m_iExp2 |
Hold base 2 Biased Exponent. More... | |
Static Public Attributes | |
static const double | k_PowersOf10 [9] |
Table giving binary powers of 10. More... | |
static const UINT32 | k_Exp10 [10] |
Table of decimal digits to fit in 32 bit space. More... | |
static const UINT64 | k_MANT_MASK_X = 0x0010000000000000ULL |
holds a decomposed double/float value. ignore sign. Support class for conversion of double/float to string. Used with cFloat64
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Decompose d.
|
static |
like ecvt() using e exponent.
|
static |
like fcvt(). Might be k_LEN_MAX_DIGITS digits long.
|
static |
opposite of k_PowersOf10 10^-348, 10^-340, ..., 10^340, stepped by 8.
|
inlinestaticnoexcept |
How many decimal digits? k_Exp10 Simple C++ implementation is faster than Highest1Bit/__builtin_clz version in this case.
|
static |
|
static |
Round last digit down?
|
static |
Change mantissa size up or down.
|
inline |
Fix m_iExp2 by making m_uMant as large as possible. cBits::Highest1Bit<>
|
inline |
|
inline |
Do math on decomposed numbers.
mult_round
|
inline |
Do math on decomposed number. ASSUME same m_iExp2
|
static |
|
static |
Table of decimal digits to fit in 32 bit space.
|
static |
|
static |
Table giving binary powers of 10.
int Gray::cFloatDeco::m_iExp2 |
Hold base 2 Biased Exponent.
UINT64 Gray::cFloatDeco::m_uMant |
Hold Mantissa.