Lines Matching defs:zSig
281 | Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
284 | together to form the result. This means that any integer portion of `zSig'
287 | than the desired result exponent whenever `zSig' is a complete, normalized
291 INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig )
294 return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig;
300 | and significand `zSig', and returns the proper single-precision floating-
310 | The input significand `zSig' has its binary point between bits 30
312 | significand must be normalized or smaller. If `zSig' is not normalized,
314 | and it must not require rounding. In the usual case that `zSig' is
320 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
344 roundBits = zSig & 0x7F;
348 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) )
357 || ( zSig + roundIncrement < 0x80000000 );
358 shift32RightJamming( zSig, - zExp, &zSig );
360 roundBits = zSig & 0x7F;
365 zSig = ( zSig + roundIncrement )>>7;
366 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
367 if ( zSig == 0 ) zExp = 0;
368 return packFloat32( zSign, zExp, zSig );
374 | and significand `zSig', and returns the proper single-precision floating-
376 | `roundAndPackFloat32' except that `zSig' does not have to be normalized.
377 | Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
382 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
386 shiftCount = countLeadingZeros32( zSig ) - 1;
387 return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount );
442 | Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
445 | together to form the result. This means that any integer portion of `zSig'
448 | than the desired result exponent whenever `zSig' is a complete, normalized
452 INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig )
455 return ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig;
461 | and significand `zSig', and returns the proper double-precision floating-
471 | The input significand `zSig' has its binary point between bits 62
473 | significand must be normalized or smaller. If `zSig' is not normalized,
475 | and it must not require rounding. In the usual case that `zSig' is
481 static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
505 roundBits = zSig & 0x3FF;
509 && ( (sbits64) ( zSig + roundIncrement ) < 0 ) )
518 || ( zSig + roundIncrement < LIT64( 0x8000000000000000 ) );
519 shift64RightJamming( zSig, - zExp, &zSig );
521 roundBits = zSig & 0x3FF;
526 zSig = ( zSig + roundIncrement )>>10;
527 zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
528 if ( zSig == 0 ) zExp = 0;
529 return packFloat64( zSign, zExp, zSig );
535 | and significand `zSig', and returns the proper double-precision floating-
537 | `roundAndPackFloat64' except that `zSig' does not have to be normalized.
538 | Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
543 normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
547 shiftCount = countLeadingZeros64( zSig ) - 1;
548 return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<<shiftCount );
609 | Packs the sign `zSign', exponent `zExp', and significand `zSig' into an
613 INLINE floatx80 packFloatx80( flag zSign, int32 zExp, bits64 zSig )
617 z.low = zSig;
1128 bits64 zSig;
1134 zSig = absA;
1135 return packFloat64( zSign, 0x432 - shiftCount, zSig<<shiftCount );
1153 bits64 zSig;
1159 zSig = absA;
1160 return packFloatx80( zSign, 0x403E - shiftCount, zSig<<shiftCount );
1632 bits32 aSig, bSig, zSig;
1676 zSig = 0x40000000 + aSig + bSig;
1681 zSig = ( aSig + bSig )<<1;
1683 if ( (sbits32) zSig < 0 ) {
1684 zSig = aSig + bSig;
1688 return roundAndPackFloat32( zSign, zExp, zSig );
1703 bits32 aSig, bSig, zSig;
1741 zSig = bSig - aSig;
1759 zSig = aSig - bSig;
1763 return normalizeRoundAndPackFloat32( zSign, zExp, zSig );
1821 bits32 zSig;
1860 zSig = zSig64;
1861 if ( 0 <= (sbits32) ( zSig<<1 ) ) {
1862 zSig <<= 1;
1865 return roundAndPackFloat32( zSign, zExp, zSig );
1879 bits32 aSig, bSig, zSig;
1923 zSig = ( ( (bits64) aSig )<<32 ) / bSig;
1924 if ( ( zSig & 0x3F ) == 0 ) {
1925 zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )<<32 );
1927 return roundAndPackFloat32( zSign, zExp, zSig );
2045 bits32 aSig, zSig;
2068 zSig = estimateSqrt32( aExp, aSig ) + 2;
2069 if ( ( zSig & 0x7F ) <= 5 ) {
2070 if ( zSig < 2 ) {
2071 zSig = 0x7FFFFFFF;
2075 term = ( (bits64) zSig ) * zSig;
2078 --zSig;
2079 rem += ( ( (bits64) zSig )<<1 ) | 1;
2081 zSig |= ( rem != 0 );
2083 shift32RightJamming( zSig, 1, &zSig );
2085 return roundAndPackFloat32( 0, zExp, zSig );
2453 bits32 zSig;
2463 zSig = aSig;
2464 if ( aExp || zSig ) {
2465 zSig |= 0x40000000;
2468 return roundAndPackFloat32( aSign, aExp, zSig );
2613 bits64 aSig, bSig, zSig;
2657 zSig = LIT64( 0x4000000000000000 ) + aSig + bSig;
2662 zSig = ( aSig + bSig )<<1;
2664 if ( (sbits64) zSig < 0 ) {
2665 zSig = aSig + bSig;
2669 return roundAndPackFloat64( zSign, zExp, zSig );
2684 bits64 aSig, bSig, zSig;
2722 zSig = bSig - aSig;
2740 zSig = aSig - bSig;
2744 return normalizeRoundAndPackFloat64( zSign, zExp, zSig );
2858 bits64 aSig, bSig, zSig;
2904 zSig = estimateDiv128To64( aSig, 0, bSig );
2905 if ( ( zSig & 0x1FF ) <= 2 ) {
2906 mul64To128( bSig, zSig, &term0, &term1 );
2909 --zSig;
2912 zSig |= ( rem1 != 0 );
2914 return roundAndPackFloat64( zSign, zExp, zSig );
3014 bits64 aSig, zSig, doubleZSig;
3037 zSig = estimateSqrt32( aExp, aSig>>21 );
3039 zSig = estimateDiv128To64( aSig, 0, zSig<<32 ) + ( zSig<<30 );
3040 if ( ( zSig & 0x1FF ) <= 5 ) {
3041 doubleZSig = zSig<<1;
3042 mul64To128( zSig, zSig, &term0, &term1 );
3045 --zSig;
3047 add128( rem0, rem1, zSig>>63, doubleZSig | 1, &rem0, &rem1 );
3049 zSig |= ( ( rem0 | rem1 ) != 0 );
3051 return roundAndPackFloat64( 0, zExp, zSig );
3395 bits64 aSig, zSig;
3406 shift64RightJamming( aSig, 1, &zSig );
3408 return roundAndPackFloat64( aSign, aExp, zSig );
4387 bits32 zSig;
4401 zSig = aSig0;
4402 if ( aExp || zSig ) {
4403 zSig |= 0x40000000;
4406 return roundAndPackFloat32( aSign, aExp, zSig );