45{
48 bool signA;
56
57
58
60 uiA = uA.ui;
64
65
66 if ( expA == 0xFF ) {
67 if ( sigA ) {
69 goto uiZ;
70 }
71 if ( ! signA )
return a;
72 goto invalid;
73 }
74
75
76 if ( signA ) {
77 if ( ! (expA | sigA) )
return a;
78 goto invalid;
79 }
80
81
82 if ( ! expA ) {
83 if ( ! sigA )
return a;
85 expA = normExpSig.exp;
86 sigA = normExpSig.sig;
87 }
88
89
90 expZ = ((expA - 0x7F)>>1) + 0x7E;
91 expA &= 1;
92 sigA = (sigA | 0x00800000)<<8;
93 sigZ =
95 >>32;
96 if ( expA ) sigZ >>= 1;
97
98
99 sigZ += 2;
100 if ( (sigZ & 0x3F) < 2 ) {
101 shiftedSigZ = sigZ>>2;
102 negRem = shiftedSigZ * shiftedSigZ;
103 sigZ &= ~3;
104 if ( negRem & 0x80000000 ) {
105 sigZ |= 1;
106 } else {
107 if ( negRem ) --sigZ;
108 }
109 }
111
112
113 invalid:
116 uiZ:
117 uZ.ui = uiZ;
118 return uZ.f;
119
120}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
uint_fast32_t softfloat_propagateNaNF32UI(uint_fast32_t uiA, uint_fast32_t uiB)
void softfloat_raiseFlags(uint_fast8_t flags)
float32_t softfloat_roundPackToF32(bool, int_fast16_t, uint_fast32_t)
struct exp16_sig32 softfloat_normSubnormalF32Sig(uint_fast32_t)
uint32_t softfloat_approxRecipSqrt32_1(unsigned int oddExpA, uint32_t a)