Lines Matching defs:zSig

161 Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
164 together to form the result. This means that any integer portion of `zSig'
167 than the desired result exponent whenever `zSig' is a complete, normalized
171 INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig )
174 return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig;
181 and significand `zSig', and returns the proper single-precision floating-
191 The input significand `zSig' has its binary point between bits 30
193 significand must be normalized or smaller. If `zSig' is not normalized,
195 and it must not require rounding. In the usual case that `zSig' is
201 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
225 roundBits = zSig & 0x7F;
229 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) )
238 || ( zSig + roundIncrement < 0x80000000 );
239 shift32RightJamming( zSig, - zExp, &zSig );
241 roundBits = zSig & 0x7F;
246 zSig = ( zSig + roundIncrement )>>7;
247 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
248 if ( zSig == 0 ) zExp = 0;
249 return packFloat32( zSign, zExp, zSig );
256 and significand `zSig', and returns the proper single-precision floating-
258 `roundAndPackFloat32' except that `zSig' does not have to be normalized.
259 Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
264 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
268 shiftCount = countLeadingZeros32( zSig ) - 1;
269 return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount );
791 bits32 aSig, bSig, zSig;
835 zSig = 0x40000000 + aSig + bSig;
840 zSig = ( aSig + bSig )<<1;
842 if ( (sbits32) zSig < 0 ) {
843 zSig = aSig + bSig;
847 return roundAndPackFloat32( zSign, zExp, zSig );
863 bits32 aSig, bSig, zSig;
901 zSig = bSig - aSig;
919 zSig = aSig - bSig;
923 return normalizeRoundAndPackFloat32( zSign, zExp, zSig );
1041 bits32 aSig, bSig, zSig, rem0, rem1, term0, term1;
1085 zSig = estimateDiv64To32( aSig, 0, bSig );
1086 if ( ( zSig & 0x3F ) <= 2 ) {
1087 mul32To64( bSig, zSig, &term0, &term1 );
1090 --zSig;
1093 zSig |= ( rem1 != 0 );
1095 return roundAndPackFloat32( zSign, zExp, zSig );
1198 bits32 aSig, zSig, rem0, rem1, term0, term1;
1220 zSig = estimateSqrt32( aExp, aSig ) + 2;
1221 if ( ( zSig & 0x7F ) <= 5 ) {
1222 if ( zSig < 2 ) {
1223 zSig = 0x7FFFFFFF;
1228 mul32To64( zSig, zSig, &term0, &term1 );
1231 --zSig;
1232 shortShift64Left( 0, zSig, 1, &term0, &term1 );
1236 zSig |= ( ( rem0 | rem1 ) != 0 );
1239 shift32RightJamming( zSig, 1, &zSig );
1241 return roundAndPackFloat32( 0, zExp, zSig );
1535 bits32 aSig0, aSig1, zSig;
1548 shift64RightJamming( aSig0, aSig1, 22, &allZero, &zSig );
1549 if ( aExp ) zSig |= 0x40000000;
1550 return roundAndPackFloat32( aSign, aExp - 0x381, zSig );