57 struct exp32_sig128 normExpSig;
67 struct uint128 sigZ, uiZ;
75 signA = signF128UI64( uiA64 );
76 expA = expF128UI64( uiA64 );
77 sigA.v64 = fracF128UI64( uiA64 );
82 signB = signF128UI64( uiB64 );
83 expB = expF128UI64( uiB64 );
84 sigB.v64 = fracF128UI64( uiB64 );
86 signZ = signA ^ signB;
89 if ( expA == 0x7FFF ) {
90 if ( sigA.v64 | sigA.v0 )
goto propagateNaN;
91 if ( expB == 0x7FFF ) {
92 if ( sigB.v64 | sigB.v0 )
goto propagateNaN;
97 if ( expB == 0x7FFF ) {
98 if ( sigB.v64 | sigB.v0 )
goto propagateNaN;
104 if ( ! (sigB.v64 | sigB.v0) ) {
105 if ( ! (expA | sigA.v64 | sigA.v0) )
goto invalid;
110 expB = normExpSig.exp;
111 sigB = normExpSig.sig;
114 if ( ! (sigA.v64 | sigA.v0) )
goto zero;
116 expA = normExpSig.exp;
117 sigA = normExpSig.sig;
121 expZ = expA - expB + 0x3FFE;
122 sigA.v64 |=
UINT64_C( 0x0001000000000000 );
123 sigB.v64 |=
UINT64_C( 0x0001000000000000 );
133 q = (q64 + 0x80000000)>>32;
139 if ( rem.v64 &
UINT64_C( 0x8000000000000000 ) ) {
147 if ( ((q + 1) & 7) < 2 ) {
151 if ( rem.v64 &
UINT64_C( 0x8000000000000000 ) ) {
158 if ( rem.v64 | rem.v0 ) q |= 1;
186 uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
191 uiZ.v64 = packToF128UI64( signZ, 0, 0 );