41#include "specialize.h"
58 uint32_t q, recip32, altRem, meanRem;
77 if ( sigA || ((expB == 0xFF) && sigB) )
goto propagateNaN;
81 if ( sigB )
goto propagateNaN;
87 if ( ! sigB )
goto invalid;
89 expB = normExpSig.
exp;
90 sigB = normExpSig.
sig;
93 if ( ! sigA )
return a;
95 expA = normExpSig.
exp;
96 sigA = normExpSig.
sig;
100 rem = sigA | 0x00800000;
102 expDiff = expA - expB;
104 if ( expDiff < -1 )
return a;
112 if ( q ) rem -= sigB;
130 if ( expDiff < 0 )
break;
138 rem = (rem<<(expDiff + 30)) - q * (
uint32_t) sigB;
146 }
while ( ! (rem & 0x80000000) );
147 meanRem = rem + altRem;
148 if ( (meanRem & 0x80000000) || (! meanRem && (q & 1)) ) rem = altRem;
150 if ( 0x80000000 <= rem ) {
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
uint_fast32_t softfloat_propagateNaNF32UI(uint_fast32_t uiA, uint_fast32_t uiB)
void softfloat_raiseFlags(uint_fast8_t flags)
float32_t f32_rem(float32_t a, float32_t b)
struct exp16_sig32 softfloat_normSubnormalF32Sig(uint_fast32_t)
float32_t softfloat_normRoundPackToF32(bool, int_fast16_t, uint_fast32_t)
uint32_t softfloat_approxRecip32_1(uint32_t a)