13 union {
float flt; uint32_t i32; }
conv;
22 union {
float flt; uint32_t i32; }
conv;
28 union {
float flt; uint32_t i32; }
conv;
32 uint16_t
base2 = (
conv.i32&0x007fffff)>>12;
33 uint16_t
base = base2 >> 1;
34 if (((base2 & 1) != 0) && (base < 1023)) base++;
43 static_assert(
bits <= 23,
"max mantissa size is 23 bits");
45 union {
float flt; uint32_t i32; }
conv;
53 union {
float flt; uint32_t i32; }
conv;
69 union {
float flt; uint32_t i32; }
conv;
72 uint32_t mantissa = (
conv.i32 & low23) >>
shift;
73 if (mantissa <
maxn) mantissa++;
99 template<
typename InItr,
typename OutItr>
106 inline static float max() {
107 union {
float flt; uint32_t i32; }
conv;
108 conv.i32 = 0x477fe000;
114 union {
float flt; uint32_t i32; }
conv;
117 conv.i32 = (0x8f<<23) - 1;
121 inline static float min() {
122 union {
float flt; uint32_t i32; }
conv;
123 conv.i32 = 0x38800000;
129 union {
float flt; uint32_t i32; }
conv;
132 conv.i32 = (0x71<<23);
137 union {
float flt; uint32_t i32; }
conv;
138 conv.i32 = 0x33800000;
144 return ((h >> 10) & 0x1f) == 0 && (h & 0x3ff) != 0;
static uint16_t float32to16crop(float x)
Fast implementation, but it crops the number so it biases low.
static float min32RoundedToMin16()
static uint16_t offsettable[64]
static HepMC::IO_HEPEVT conv
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
float operator()(float f) const
static float float16to32(uint16_t h)
static uint16_t basetable[512]
static float denorm_min()
static uint8_t shifttable[512]
static uint16_t float32to16(float x)
static uint32_t mantissatable[2048]
static float reduceMantissaToNbits(const float &f, int bits)
base
Make Sure CMSSW is Setup ##.
static float reduceMantissaToNbitsRounding(float f, int bits)
static bool isdenorm(uint16_t h)
ReduceMantissaToNbitsRounding(int bits)
static float reduceMantissaToNbitsRounding(const float &f)
static float max32RoundedToMax16()
static unsigned int const shift
static uint16_t float32to16round(float x)
Slower implementation, but it rounds to avoid biases.
static float reduceMantissaToNbits(const float &f)
static uint32_t exponenttable[64]
static void reduceMantissaToNbitsRounding(int bits, InItr begin, InItr end, OutItr out)