45{
55
56
57
62
63
64 expDiff = expA - expB;
65 if ( ! expDiff ) {
66
67
68 if ( ! expA ) {
69 uiZ = uiA + sigB;
70 goto uiZ;
71 }
72 if ( expA == 0x7FF ) {
73 if ( sigA | sigB ) goto propagateNaN;
74 uiZ = uiA;
75 goto uiZ;
76 }
77 expZ = expA;
78 sigZ =
UINT64_C( 0x0020000000000000 ) + sigA + sigB;
79 sigZ <<= 9;
80 } else {
81
82
83 sigA <<= 9;
84 sigB <<= 9;
85 if ( expDiff < 0 ) {
86 if ( expB == 0x7FF ) {
87 if ( sigB ) goto propagateNaN;
89 goto uiZ;
90 }
91 expZ = expB;
92 if ( expA ) {
93 sigA +=
UINT64_C( 0x2000000000000000 );
94 } else {
95 sigA <<= 1;
96 }
98 } else {
99 if ( expA == 0x7FF ) {
100 if ( sigA ) goto propagateNaN;
101 uiZ = uiA;
102 goto uiZ;
103 }
104 expZ = expA;
105 if ( expB ) {
106 sigB +=
UINT64_C( 0x2000000000000000 );
107 } else {
108 sigB <<= 1;
109 }
111 }
112 sigZ =
UINT64_C( 0x2000000000000000 ) + sigA + sigB;
113 if ( sigZ <
UINT64_C( 0x4000000000000000 ) ) {
114 --expZ;
115 sigZ <<= 1;
116 }
117 }
119
120
121 propagateNaN:
123 uiZ:
124 uZ.ui = uiZ;
125 return uZ.f;
126
127}
uint_fast64_t softfloat_propagateNaNF64UI(uint_fast64_t uiA, uint_fast64_t uiB)
float64_t softfloat_roundPackToF64(bool, int_fast16_t, uint_fast64_t)
#define packToF64UI(sign, exp, sig)
uint64_t softfloat_shiftRightJam64(uint64_t a, uint_fast32_t dist)