57 struct uint128 uiZ, sigZ;
60 struct uint128_extra sig128Extra;
63 expA = expF128UI64( uiA64 );
64 sigA.v64 = fracF128UI64( uiA64 );
66 expB = expF128UI64( uiB64 );
67 sigB.v64 = fracF128UI64( uiB64 );
69 expDiff = expA - expB;
71 if ( expA == 0x7FFF ) {
72 if ( sigA.v64 | sigA.v0 | sigB.v64 | sigB.v0 )
goto propagateNaN;
79 uiZ.v64 = packToF128UI64( signZ, 0, sigZ.v64 );
84 sigZ.v64 |=
UINT64_C( 0x0002000000000000 );
89 if ( expB == 0x7FFF ) {
90 if ( sigB.v64 | sigB.v0 )
goto propagateNaN;
91 uiZ.v64 = packToF128UI64( signZ, 0x7FFF, 0 );
97 sigA.v64 |=
UINT64_C( 0x0001000000000000 );
101 if ( ! expDiff )
goto newlyAligned;
105 sigA = sig128Extra.v;
106 sigZExtra = sig128Extra.extra;
108 if ( expA == 0x7FFF ) {
109 if ( sigA.v64 | sigA.v0 )
goto propagateNaN;
116 sigB.v64 |=
UINT64_C( 0x0001000000000000 );
120 if ( ! expDiff )
goto newlyAligned;
124 sigB = sig128Extra.v;
125 sigZExtra = sig128Extra.extra;
130 sigA.v64 |
UINT64_C( 0x0001000000000000 ),
136 if ( sigZ.v64 <
UINT64_C( 0x0002000000000000 ) )
goto roundAndPack;
141 sigZ.v64, sigZ.v0, sigZExtra, 1 );
142 sigZ = sig128Extra.v;
143 sigZExtra = sig128Extra.extra;