numeric.float32.internal.operator


const auto _mantissa_width = 23 §
const auto _exponent_width = 8 §
const auto _exponent_bias = 127 §
using float32PackedFormat = floatPackedFormat<23, 8> §
struct float32ExpandedFormat §

Fields

  • uint24 mantissa §
    
  • int9 exponent §
    
  • uint1 sign §
    
struct float32StickyFormat §

Fields

  • uint1 sticky §
    
  • uint26 mantissaGuardRound §
    
  • int10 exponent §
    
  • uint1 sign §
    
struct productFormat §

Fields

  • uint24 sticky §
    
  • uint1 round §
    
  • uint1 guard §
    
  • uint24 product §
    
template <Denorm denorm_mode>
inline float32ExpandedFormat unpackFloat32(float32PackedFormat a) §

Apply exponent bias and add mantissa implied one.

inline float32StickyFormat normalizeOutput2Zero(float32StickyFormat input) §

Set denorm values to 0.

inline float32StickyFormat multNormalizeOutput1(float32StickyFormat in) §

Shift left to normalize small mantissa values. There is guaranteed to be a 1 in either the MSB or the second-most significant bit because mantissas are normalized before taking the product.

template <Denorm denorm_mode>
inline specialCaseFlags getSpecialCases(float32PackedFormat a) §

Check if nan, zero, inf, or finite.

inline 
uint27
shiftRightSticky(uint27 inMantissaGuardRoundSticky, uint8 shiftRightAmount) §
inline 
float32StickyFormat align(float32ExpandedFormat input, uint8 shiftRightAmount) §
inline uint5 priorityOneEncoderCountDown26(uint26 in) §
inline float32StickyFormat addNormalizeOutput1(float32StickyFormat in) §

Shift left to normalize small mantissa values. There is no guarantee the input isn’t all zeros.

inline float32 float32_mul_denormoff(float32 in1, float32 in2) §

Multiply two float32 values with denorm off and return the float32 result.

inline float32 float32_add_denormoff(float32 in1, float32 in2) §

Add two float32 values with denorm off and return the float32 result.

inline float32 neg(float32 x) §

Negate input.

inline float32 float32_sub_denormoff(float32 in1, float32 in2) §

Subtract in2 from in1.