45{
48 bool signA;
53 bool signB;
56 bool signZ;
63
64
65
67 uiA = uA.ui;
71 uB.f = b;
72 uiB = uB.ui;
76 signZ = signA ^ signB;
77
78
79 if ( expA == 0x1F ) {
80 if ( sigA || ((expB == 0x1F) && sigB) ) goto propagateNaN;
81 magBits = expB | sigB;
82 goto infArg;
83 }
84 if ( expB == 0x1F ) {
85 if ( sigB ) goto propagateNaN;
86 magBits = expA | sigA;
87 goto infArg;
88 }
89
90
91 if ( ! expA ) {
92 if ( ! sigA ) goto zero;
94 expA = normExpSig.exp;
95 sigA = normExpSig.sig;
96 }
97 if ( ! expB ) {
98 if ( ! sigB ) goto zero;
100 expB = normExpSig.exp;
101 sigB = normExpSig.sig;
102 }
103
104
105 expZ = expA + expB - 0xF;
106 sigA = (sigA | 0x0400)<<4;
107 sigB = (sigB | 0x0400)<<5;
109 sigZ = sig32Z>>16;
110 if ( sig32Z & 0xFFFF ) sigZ |= 1;
111 if ( sigZ < 0x4000 ) {
112 --expZ;
113 sigZ <<= 1;
114 }
116
117
118 propagateNaN:
120 goto uiZ;
121
122
123 infArg:
124 if ( ! magBits ) {
127 } else {
129 }
130 goto uiZ;
131
132
133 zero:
135 uiZ:
136 uZ.ui = uiZ;
137 return uZ.f;
138
139}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
uint_fast16_t softfloat_propagateNaNF16UI(uint_fast16_t uiA, uint_fast16_t uiB)
void softfloat_raiseFlags(uint_fast8_t flags)
float16_t softfloat_roundPackToF16(bool, int_fast16_t, uint_fast16_t)
struct exp8_sig16 softfloat_normSubnormalF16Sig(uint_fast16_t)
#define packToF16UI(sign, exp, sig)