Lines Matching defs:zSign
106 input. If `zSign' is 1, the input is negated before being converted to an
114 static int32 roundAndPackInt32( flag zSign, bits64 absZ )
130 if ( zSign ) {
142 if ( zSign ) z = - z;
143 if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) {
145 return zSign ? (sbits32) 0x80000000 : 0x7FFFFFFF;
157 If `zSign' is 1, the input is negated before being converted to an integer.
165 static int64 roundAndPackInt64( flag zSign, bits64 absZ0, bits64 absZ1 )
179 if ( zSign ) {
193 if ( zSign ) z = - z;
194 if ( z && ( ( z < 0 ) ^ zSign ) ) {
198 zSign ? (sbits64) LIT64( 0x8000000000000000 )
264 Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
274 INLINE float32 packFloat32( flag zSign, int16 zExp, bits32 zSig )
277 return ( ( (bits32) zSign )<<31 ) + ( ( (bits32) zExp )<<23 ) + zSig;
283 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
304 static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
320 if ( zSign ) {
335 return packFloat32( zSign, 0xFF, 0 ) - ( roundIncrement == 0 );
352 return packFloat32( zSign, zExp, zSig );
358 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
367 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
372 return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount );
433 Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
443 INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig )
446 return FLOAT64_MANGLE( ( ( (bits64) zSign )<<63 ) +
453 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
474 static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
490 if ( zSign ) {
506 FLOAT64_DEMANGLE(packFloat64( zSign, 0x7FF, 0 )) -
524 return packFloat64( zSign, zExp, zSig );
530 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
539 normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
544 return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<<shiftCount );
610 Packs the sign `zSign', exponent `zExp', and significand `zSig' into an
614 INLINE floatx80 packFloatx80( flag zSign, int32 zExp, bits64 zSig )
619 z.high = ( ( (bits16) zSign )<<15 ) + zExp;
626 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
651 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1
679 if ( zSign ) {
711 return packFloatx80( zSign, zExp, zSig0 );
726 return packFloatx80( zSign, zExp, zSig0 );
734 if ( zSign ) {
753 || ( zSign && ( roundingMode == float_round_up ) )
754 || ( ! zSign && ( roundingMode == float_round_down ) )
756 return packFloatx80( zSign, 0x7FFE, ~ roundMask );
758 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
774 if ( zSign ) {
787 return packFloatx80( zSign, zExp, zSig0 );
804 return packFloatx80( zSign, zExp, zSig0 );
810 Takes an abstract floating-point value having sign `zSign', exponent
820 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1
834 roundAndPackFloatx80( roundingPrecision, zSign, zExp, zSig0, zSig1 );
937 Packs the sign `zSign', the exponent `zExp', and the significand formed
940 proper positions, the three fields `zSign', `zExp', and `zSig0' are simply
950 packFloat128( flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 )
955 z.high = ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<48 ) + zSig0;
962 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
984 flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1, bits64 zSig2 )
997 if ( zSign ) {
1019 || ( zSign && ( roundingMode == float_round_up ) )
1020 || ( ! zSign && ( roundingMode == float_round_down ) )
1024 zSign,
1030 return packFloat128( zSign, 0x7FFF, 0, 0 );
1051 if ( zSign ) {
1068 return packFloat128( zSign, zExp, zSig0, zSig1 );
1074 Takes an abstract floating-point value having sign `zSign', exponent `zExp',
1085 flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 )
1105 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 );
1120 flag zSign;
1124 zSign = ( a < 0 );
1125 return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a );
1149 flag zSign;
1155 zSign = ( a < 0 );
1156 absA = zSign ? - a : a;
1159 return packFloat64( zSign, 0x432 - shiftCount, zSig<<shiftCount );
1188 flag zSign;
1194 zSign = ( a < 0 );
1195 absA = zSign ? - a : a;
1198 return packFloatx80( zSign, 0x403E - shiftCount, zSig<<shiftCount );
1226 flag zSign;
1232 zSign = ( a < 0 );
1233 absA = zSign ? - a : a;
1236 return packFloat128( zSign, 0x402E - shiftCount, zSig0<<shiftCount, 0 );
1263 flag zSign;
1268 zSign = ( a < 0 );
1269 absA = zSign ? - a : a;
1272 return packFloat32( zSign, 0x95 - shiftCount, absA<<shiftCount );
1282 return roundAndPackFloat32( zSign, 0x9C - shiftCount, absA );
1296 flag zSign;
1302 zSign = ( a < 0 );
1303 return normalizeRoundAndPackFloat64( zSign, 0x43C, zSign ? - a : a );
1319 flag zSign;
1324 zSign = ( a < 0 );
1325 absA = zSign ? - a : a;
1327 return packFloatx80( zSign, 0x403E - shiftCount, absA<<shiftCount );
1346 flag zSign;
1353 zSign = ( a < 0 );
1354 absA = zSign ? - a : a;
1367 return packFloat128( zSign, zExp, zSig0, zSig1 );
1700 floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
1701 before being returned. `zSign' is ignored if the result is a NaN.
1706 static float32 addFloat32Sigs( float32 a, float32 b, flag zSign )
1736 return packFloat32( zSign, 0xFF, 0 );
1752 if ( aExp == 0 ) return packFloat32( zSign, 0, ( aSig + bSig )>>6 );
1765 return roundAndPackFloat32( zSign, zExp, zSig );
1772 precision floating-point values `a' and `b'. If `zSign' is 1, the
1773 difference is negated before being returned. `zSign' is ignored if the
1778 static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
1808 return packFloat32( zSign ^ 1, 0xFF, 0 );
1821 zSign ^= 1;
1841 return normalizeRoundAndPackFloat32( zSign, zExp, zSig );
1898 flag aSign, bSign, zSign;
1910 zSign = aSign ^ bSign;
1919 return packFloat32( zSign, 0xFF, 0 );
1927 return packFloat32( zSign, 0xFF, 0 );
1930 if ( aSig == 0 ) return packFloat32( zSign, 0, 0 );
1934 if ( bSig == 0 ) return packFloat32( zSign, 0, 0 );
1946 return roundAndPackFloat32( zSign, zExp, zSig );
1959 flag aSign, bSign, zSign;
1969 zSign = aSign ^ bSign;
1977 return packFloat32( zSign, 0xFF, 0 );
1981 return packFloat32( zSign, 0, 0 );
1990 return packFloat32( zSign, 0xFF, 0 );
1995 if ( aSig == 0 ) return packFloat32( zSign, 0, 0 );
2009 return roundAndPackFloat32( zSign, zExp, zSig );
2023 flag aSign, bSign, zSign;
2109 zSign = ( (sbits32) aSig < 0 );
2110 if ( zSign ) aSig = - aSig;
2111 return normalizeRoundAndPackFloat32( aSign ^ zSign, bExp, aSig );
2666 floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
2667 before being returned. `zSign' is ignored if the result is a NaN.
2672 static float64 addFloat64Sigs( float64 a, float64 b, flag zSign )
2702 return packFloat64( zSign, 0x7FF, 0 );
2718 if ( aExp == 0 ) return packFloat64( zSign, 0, ( aSig + bSig )>>9 );
2731 return roundAndPackFloat64( zSign, zExp, zSig );
2738 precision floating-point values `a' and `b'. If `zSign' is 1, the
2739 difference is negated before being returned. `zSign' is ignored if the
2744 static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
2774 return packFloat64( zSign ^ 1, 0x7FF, 0 );
2787 zSign ^= 1;
2807 return normalizeRoundAndPackFloat64( zSign, zExp, zSig );
2864 flag aSign, bSign, zSign;
2874 zSign = aSign ^ bSign;
2883 return packFloat64( zSign, 0x7FF, 0 );
2891 return packFloat64( zSign, 0x7FF, 0 );
2894 if ( aSig == 0 ) return packFloat64( zSign, 0, 0 );
2898 if ( bSig == 0 ) return packFloat64( zSign, 0, 0 );
2910 return roundAndPackFloat64( zSign, zExp, zSig0 );
2923 flag aSign, bSign, zSign;
2935 zSign = aSign ^ bSign;
2943 return packFloat64( zSign, 0x7FF, 0 );
2947 return packFloat64( zSign, 0, 0 );
2956 return packFloat64( zSign, 0x7FF, 0 );
2961 if ( aSig == 0 ) return packFloat64( zSign, 0, 0 );
2981 return roundAndPackFloat64( zSign, zExp, zSig );
2995 flag aSign, bSign, zSign;
3066 zSign = ( (sbits64) aSig < 0 );
3067 if ( zSign ) aSig = - aSig;
3068 return normalizeRoundAndPackFloat64( aSign ^ zSign, bExp, aSig );
3610 precision floating-point values `a' and `b'. If `zSign' is 1, the sum is
3611 negated before being returned. `zSign' is ignored if the result is a NaN.
3616 static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
3639 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3670 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 );
3677 double-precision floating-point values `a' and `b'. If `zSign' is 1, the
3678 difference is negated before being returned. `zSign' is ignored if the
3683 static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
3717 return packFloatx80( zSign ^ 1, 0x7FFF, LIT64( 0x8000000000000000 ) );
3724 zSign ^= 1;
3739 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 );
3796 flag aSign, bSign, zSign;
3807 zSign = aSign ^ bSign;
3814 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3825 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3828 if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 );
3832 if ( bSig == 0 ) return packFloatx80( zSign, 0, 0 );
3843 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 );
3856 flag aSign, bSign, zSign;
3868 zSign = aSign ^ bSign;
3875 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3879 return packFloatx80( zSign, 0, 0 );
3891 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3896 if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 );
3924 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 );
3937 flag aSign, bSign, zSign;
3975 zSign = aSign;
4018 zSign = ! zSign;
4022 80, zSign, bExp + expDiff, aSig0, aSig1 );
4759 floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
4760 before being returned. `zSign' is ignored if the result is a NaN.
4765 static float128 addFloat128Sigs( float128 a, float128 b, flag zSign )
4796 return packFloat128( zSign, 0x7FFF, 0, 0 );
4816 if ( aExp == 0 ) return packFloat128( zSign, 0, zSig0, zSig1 );
4831 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 );
4838 precision floating-point values `a' and `b'. If `zSign' is 1, the
4839 difference is negated before being returned. `zSign' is ignored if the
4844 static float128 subFloat128Sigs( float128 a, float128 b, flag zSign )
4883 return packFloat128( zSign ^ 1, 0x7FFF, 0, 0 );
4896 zSign ^= 1;
4916 return normalizeRoundAndPackFloat128( zSign, zExp - 14, zSig0, zSig1 );
4973 flag aSign, bSign, zSign;
4986 zSign = aSign ^ bSign;
4993 return packFloat128( zSign, 0x7FFF, 0, 0 );
5004 return packFloat128( zSign, 0x7FFF, 0, 0 );
5007 if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 );
5011 if ( ( bSig0 | bSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 );
5025 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 );
5038 flag aSign, bSign, zSign;
5052 zSign = aSign ^ bSign;
5059 return packFloat128( zSign, 0x7FFF, 0, 0 );
5063 return packFloat128( zSign, 0, 0, 0 );
5075 return packFloat128( zSign, 0x7FFF, 0, 0 );
5080 if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 );
5110 return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 );
5123 flag aSign, bSign, zSign;
5218 zSign = ( (sbits64) aSig0 < 0 );
5219 if ( zSign ) sub128( 0, 0, aSig0, aSig1, &aSig0, &aSig1 );
5221 normalizeRoundAndPackFloat128( aSign ^ zSign, bExp - 4, aSig0, aSig1 );