![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cFloatEst.h>
Public Member Functions | |
UNITTEST_FRIEND (cFloatEst) | |
![]() | |
cFloat32 () noexcept | |
cFloat32 (float f) noexcept | |
void | put_Bits (UINT32 dw) noexcept |
UINT32 | get_Mantissa () const noexcept |
Static Public Member Functions | |
static float | Sqrt (float n) noexcept |
static float | pow2 (int iPow) |
static int | ifloor_log2 (float x) |
static int | iceil_log2 (float x) |
static int | ifloor (float f) |
static int | iceil (float f) |
static bool | IsInteger (float f) |
![]() | |
static UINT32 | toBits (float src) noexcept |
static float | fromBits (UINT32 src) noexcept |
Additional Inherited Members | |
![]() | |
cUnion32 | m_v |
holds the float32. More... | |
![]() | |
static const UINT32 | k_uOne = 0x3f800000 |
(UINT32) = float 1.0f (8 bit exponent) More... | |
static const UINT32 | k_uTwo = 0x40000000 |
(UINT32) = float 2.0f More... | |
static const UINT32 | k_SIGN_MASK = 0x80000000 |
1 bit = value sign (Sign_bit) More... | |
static const UINT32 | k_EXP_MASK = 0x7f800000 |
8 bits = signed exponent (base 2) More... | |
static const UINT32 | k_MANT_MASK = 0x007fffff |
23 bits = fractional mantissa = FLT_MANT_DIG More... | |
static const UINT32 | k_MANT_BITS = 23 |
23 bits = fractional mantissa = FLT_MANT_DIG More... | |
fast float32 estimation helpers Use FLT_MAX
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
like powf(2, iPow) fast approximation 32 bit float.
|
inlinestaticnoexcept |
Fast but not very accurate square root approximation trick. like sqrtf(x) 32 bit float.
GrayLib::cFloatEst::UNITTEST_FRIEND | ( | cFloatEst | ) |