45{
48 bool signA;
53 uint32_t sig32A, recipSqrt32, sig32Z;
58
59
60
62 uiA = uA.ui;
66
67
68 if ( expA == 0x7FF ) {
69 if ( sigA ) {
71 goto uiZ;
72 }
73 if ( ! signA )
return a;
74 goto invalid;
75 }
76
77
78 if ( signA ) {
79 if ( ! (expA | sigA) )
return a;
80 goto invalid;
81 }
82
83
84 if ( ! expA ) {
85 if ( ! sigA )
return a;
87 expA = normExpSig.exp;
88 sigA = normExpSig.sig;
89 }
90
91
92
93
94
95 expZ = ((expA - 0x3FF)>>1) + 0x3FE;
96 expA &= 1;
97 sigA |=
UINT64_C( 0x0010000000000000 );
98 sig32A = sigA>>21;
101 if ( expA ) {
102 sigA <<= 8;
103 sig32Z >>= 1;
104 } else {
105 sigA <<= 9;
106 }
110
111
112 if ( (sigZ & 0x1FF) < 0x22 ) {
114 shiftedSigZ = sigZ>>6;
115 rem = (sigA<<52) - shiftedSigZ * shiftedSigZ;
116 if ( rem &
UINT64_C( 0x8000000000000000 ) ) {
117 --sigZ;
118 } else {
119 if ( rem ) sigZ |= 1;
120 }
121 }
123
124
125 invalid:
128 uiZ:
129 uZ.ui = uiZ;
130 return uZ.f;
131
132}
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)
uint32_t softfloat_approxRecipSqrt32_1(unsigned int oddExpA, uint32_t a)