45{
48 bool signA;
53 bool signB;
56 bool signZ;
59 uint32_t recip32, sig32Z, doubleTerm;
65
66
67
69 uiA = uA.ui;
73 uB.f = b;
74 uiB = uB.ui;
78 signZ = signA ^ signB;
79
80
81 if ( expA == 0x7FF ) {
82 if ( sigA ) goto propagateNaN;
83 if ( expB == 0x7FF ) {
84 if ( sigB ) goto propagateNaN;
85 goto invalid;
86 }
87 goto infinity;
88 }
89 if ( expB == 0x7FF ) {
90 if ( sigB ) goto propagateNaN;
91 goto zero;
92 }
93
94
95 if ( ! expB ) {
96 if ( ! sigB ) {
97 if ( ! (expA | sigA) ) goto invalid;
99 goto infinity;
100 }
102 expB = normExpSig.exp;
103 sigB = normExpSig.sig;
104 }
105 if ( ! expA ) {
106 if ( ! sigA ) goto zero;
108 expA = normExpSig.exp;
109 sigA = normExpSig.sig;
110 }
111
112
113 expZ = expA - expB + 0x3FE;
114 sigA |=
UINT64_C( 0x0010000000000000 );
115 sigB |=
UINT64_C( 0x0010000000000000 );
116 if ( sigA < sigB ) {
117 --expZ;
118 sigA <<= 11;
119 } else {
120 sigA <<= 10;
121 }
122 sigB <<= 11;
125 doubleTerm = sig32Z<<1;
126 rem =
131
132
133 if ( (sigZ & 0x1FF) < 4<<4 ) {
134 q &= ~7;
136 doubleTerm = q<<1;
137 rem =
140 if ( rem &
UINT64_C( 0x8000000000000000 ) ) {
141 sigZ -= 1<<7;
142 } else {
143 if ( rem ) sigZ |= 1;
144 }
145 }
147
148
149 propagateNaN:
151 goto uiZ;
152
153
154 invalid:
157 goto uiZ;
158
159
160 infinity:
162 goto uiZ;
163
164
165 zero:
167 uiZ:
168 uZ.ui = uiZ;
169 return uZ.f;
170
171}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
uint_fast64_t softfloat_propagateNaNF64UI(uint_fast64_t uiA, uint_fast64_t uiB)
void softfloat_raiseFlags(uint_fast8_t flags)
float64_t softfloat_roundPackToF64(bool, int_fast16_t, uint_fast64_t)
struct exp16_sig64 softfloat_normSubnormalF64Sig(uint_fast64_t)
#define packToF64UI(sign, exp, sig)
uint32_t softfloat_approxRecip32_1(uint32_t a)
@ softfloat_flag_infinite