Lines Matching refs:roundData
70 static int32 roundAndPackInt32( struct roundingData *roundData, flag zSign, bits64 absZ ) in roundAndPackInt32() argument
77 roundingMode = roundData->mode; in roundAndPackInt32()
100 roundData->exception |= float_flag_invalid; in roundAndPackInt32()
103 if ( roundBits ) roundData->exception |= float_flag_inexact; in roundAndPackInt32()
217 static float32 roundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 … in roundAndPackFloat32() argument
224 roundingMode = roundData->mode; in roundAndPackFloat32()
247 roundData->exception |= float_flag_overflow | float_flag_inexact; in roundAndPackFloat32()
258 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow; in roundAndPackFloat32()
261 if ( roundBits ) roundData->exception |= float_flag_inexact; in roundAndPackFloat32()
280 normalizeRoundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 zSig ) in normalizeRoundAndPackFloat32() argument
285 return roundAndPackFloat32( roundData, zSign, zExp - shiftCount, zSig<<shiftCount ); in normalizeRoundAndPackFloat32()
388 static float64 roundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 … in roundAndPackFloat64() argument
395 roundingMode = roundData->mode; in roundAndPackFloat64()
420 roundData->exception |= float_flag_overflow | float_flag_inexact; in roundAndPackFloat64()
431 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow; in roundAndPackFloat64()
434 if ( roundBits ) roundData->exception |= float_flag_inexact; in roundAndPackFloat64()
453 normalizeRoundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 zSig ) in normalizeRoundAndPackFloat64() argument
458 return roundAndPackFloat64( roundData, zSign, zExp - shiftCount, zSig<<shiftCount ); in normalizeRoundAndPackFloat64()
566 struct roundingData *roundData, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 in roundAndPackFloatx80() argument
573 roundingMode = roundData->mode; in roundAndPackFloatx80()
574 roundingPrecision = roundData->precision; in roundAndPackFloatx80()
618 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow; in roundAndPackFloatx80()
619 if ( roundBits ) roundData->exception |= float_flag_inexact; in roundAndPackFloatx80()
630 if ( roundBits ) roundData->exception |= float_flag_inexact; in roundAndPackFloatx80()
667 roundData->exception |= float_flag_overflow | float_flag_inexact; in roundAndPackFloatx80()
684 if ( isTiny && zSig1 ) roundData->exception |= float_flag_underflow; in roundAndPackFloatx80()
685 if ( zSig1 ) roundData->exception |= float_flag_inexact; in roundAndPackFloatx80()
705 if ( zSig1 ) roundData->exception |= float_flag_inexact; in roundAndPackFloatx80()
735 struct roundingData *roundData, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 in normalizeRoundAndPackFloatx80() argument
749 roundAndPackFloatx80( roundData, zSign, zExp, zSig0, zSig1 ); in normalizeRoundAndPackFloatx80()
762 float32 int32_to_float32(struct roundingData *roundData, int32 a) in int32_to_float32() argument
769 return normalizeRoundAndPackFloat32( roundData, zSign, 0x9C, zSign ? - a : a ); in int32_to_float32()
835 int32 float32_to_int32( struct roundingData *roundData, float32 a ) in float32_to_int32() argument
851 return roundAndPackInt32( roundData, aSign, zSig ); in float32_to_int32()
968 float32 float32_round_to_int( struct roundingData *roundData, float32 a ) in float32_round_to_int() argument
983 roundingMode = roundData->mode; in float32_round_to_int()
986 roundData->exception |= float_flag_inexact; in float32_round_to_int()
1015 if ( z != a ) roundData->exception |= float_flag_inexact; in float32_round_to_int()
1029 static float32 addFloat32Sigs( struct roundingData *roundData, float32 a, float32 b, flag zSign ) in addFloat32Sigs() argument
1088 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in addFloat32Sigs()
1101 static float32 subFloat32Sigs( struct roundingData *roundData, float32 a, float32 b, flag zSign ) in subFloat32Sigs() argument
1118 roundData->exception |= float_flag_invalid; in subFloat32Sigs()
1127 return packFloat32( roundData->mode == float_round_down, 0, 0 ); in subFloat32Sigs()
1164 return normalizeRoundAndPackFloat32( roundData, zSign, zExp, zSig ); in subFloat32Sigs()
1175 float32 float32_add( struct roundingData *roundData, float32 a, float32 b ) in float32_add() argument
1182 return addFloat32Sigs( roundData, a, b, aSign ); in float32_add()
1185 return subFloat32Sigs( roundData, a, b, aSign ); in float32_add()
1197 float32 float32_sub( struct roundingData *roundData, float32 a, float32 b ) in float32_sub() argument
1204 return subFloat32Sigs( roundData, a, b, aSign ); in float32_sub()
1207 return addFloat32Sigs( roundData, a, b, aSign ); in float32_sub()
1219 float32 float32_mul( struct roundingData *roundData, float32 a, float32 b ) in float32_mul() argument
1239 roundData->exception |= float_flag_invalid; in float32_mul()
1247 roundData->exception |= float_flag_invalid; in float32_mul()
1269 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in float32_mul()
1280 float32 float32_div( struct roundingData *roundData, float32 a, float32 b ) in float32_div() argument
1297 roundData->exception |= float_flag_invalid; in float32_div()
1309 roundData->exception |= float_flag_invalid; in float32_div()
1312 roundData->exception |= float_flag_divbyzero; in float32_div()
1336 return roundAndPackFloat32( roundData, zSign, zExp, zSig ); in float32_div()
1347 float32 float32_rem( struct roundingData *roundData, float32 a, float32 b ) in float32_rem() argument
1367 roundData->exception |= float_flag_invalid; in float32_rem()
1376 roundData->exception |= float_flag_invalid; in float32_rem()
1439 return normalizeRoundAndPackFloat32( roundData, aSign ^ zSign, bExp, aSig ); in float32_rem()
1450 float32 float32_sqrt( struct roundingData *roundData, float32 a ) in float32_sqrt() argument
1463 roundData->exception |= float_flag_invalid; in float32_sqrt()
1468 roundData->exception |= float_flag_invalid; in float32_sqrt()
1494 return roundAndPackFloat32( roundData, 0, zExp, zSig ); in float32_sqrt()
1652 int32 float64_to_int32( struct roundingData *roundData, float64 a ) in float64_to_int32() argument
1665 return roundAndPackInt32( roundData, aSign, aSig ); in float64_to_int32()
1727 int32 float64_to_uint32( struct roundingData *roundData, float64 a ) in float64_to_uint32() argument
1740 return roundAndPackInt32( roundData, aSign, aSig ); in float64_to_uint32()
1796 float32 float64_to_float32( struct roundingData *roundData, float64 a ) in float64_to_float32() argument
1816 return roundAndPackFloat32( roundData, aSign, aExp, zSig ); in float64_to_float32()
1863 float64 float64_round_to_int( struct roundingData *roundData, float64 a ) in float64_round_to_int() argument
1880 roundData->exception |= float_flag_inexact; in float64_round_to_int()
1882 switch ( roundData->mode ) { in float64_round_to_int()
1900 roundingMode = roundData->mode; in float64_round_to_int()
1911 if ( z != a ) roundData->exception |= float_flag_inexact; in float64_round_to_int()
1925 static float64 addFloat64Sigs( struct roundingData *roundData, float64 a, float64 b, flag zSign ) in addFloat64Sigs() argument
1984 return roundAndPackFloat64( roundData, zSign, zExp, zSig ); in addFloat64Sigs()
1997 static float64 subFloat64Sigs( struct roundingData *roundData, float64 a, float64 b, flag zSign ) in subFloat64Sigs() argument
2014 roundData->exception |= float_flag_invalid; in subFloat64Sigs()
2023 return packFloat64( roundData->mode == float_round_down, 0, 0 ); in subFloat64Sigs()
2060 return normalizeRoundAndPackFloat64( roundData, zSign, zExp, zSig ); in subFloat64Sigs()
2071 float64 float64_add( struct roundingData *roundData, float64 a, float64 b ) in float64_add() argument
2078 return addFloat64Sigs( roundData, a, b, aSign ); in float64_add()
2081 return subFloat64Sigs( roundData, a, b, aSign ); in float64_add()
2093 float64 float64_sub( struct roundingData *roundData, float64 a, float64 b ) in float64_sub() argument
2100 return subFloat64Sigs( roundData, a, b, aSign ); in float64_sub()
2103 return addFloat64Sigs( roundData, a, b, aSign ); in float64_sub()
2115 float64 float64_mul( struct roundingData *roundData, float64 a, float64 b ) in float64_mul() argument
2133 roundData->exception |= float_flag_invalid; in float64_mul()
2141 roundData->exception |= float_flag_invalid; in float64_mul()
2163 return roundAndPackFloat64( roundData, zSign, zExp, zSig0 ); in float64_mul()
2174 float64 float64_div( struct roundingData *roundData, float64 a, float64 b ) in float64_div() argument
2193 roundData->exception |= float_flag_invalid; in float64_div()
2205 roundData->exception |= float_flag_invalid; in float64_div()
2208 roundData->exception |= float_flag_divbyzero; in float64_div()
2234 return roundAndPackFloat64( roundData, zSign, zExp, zSig ); in float64_div()
2245 float64 float64_rem( struct roundingData *roundData, float64 a, float64 b ) in float64_rem() argument
2263 roundData->exception |= float_flag_invalid; in float64_rem()
2272 roundData->exception |= float_flag_invalid; in float64_rem()
2320 return normalizeRoundAndPackFloat64( roundData, aSign ^ zSign, bExp, aSig ); in float64_rem()
2331 float64 float64_sqrt( struct roundingData *roundData, float64 a ) in float64_sqrt() argument
2345 roundData->exception |= float_flag_invalid; in float64_sqrt()
2350 roundData->exception |= float_flag_invalid; in float64_sqrt()
2381 return roundAndPackFloat64( roundData, 0, zExp, zSig ); in float64_sqrt()
2541 int32 floatx80_to_int32( struct roundingData *roundData, floatx80 a ) in floatx80_to_int32() argument
2554 return roundAndPackInt32( roundData, aSign, aSig ); in floatx80_to_int32()
2612 float32 floatx80_to_float32( struct roundingData *roundData, floatx80 a ) in floatx80_to_float32() argument
2629 return roundAndPackFloat32( roundData, aSign, aExp, aSig ); in floatx80_to_float32()
2641 float64 floatx80_to_float64( struct roundingData *roundData, floatx80 a ) in floatx80_to_float64() argument
2658 return roundAndPackFloat64( roundData, aSign, aExp, zSig ); in floatx80_to_float64()
2670 floatx80 floatx80_round_to_int( struct roundingData *roundData, floatx80 a ) in floatx80_round_to_int() argument
2690 roundData->exception |= float_flag_inexact; in floatx80_round_to_int()
2692 switch ( roundData->mode ) { in floatx80_round_to_int()
2716 roundingMode = roundData->mode; in floatx80_round_to_int()
2731 if ( z.low != a.low ) roundData->exception |= float_flag_inexact; in floatx80_round_to_int()
2745 static floatx80 addFloatx80Sigs( struct roundingData *roundData, floatx80 a, floatx80 b, flag zSign… in addFloatx80Sigs() argument
2801 roundData, zSign, zExp, zSig0, zSig1 ); in addFloatx80Sigs()
2814 static floatx80 subFloatx80Sigs( struct roundingData *roundData, floatx80 a, floatx80 b, flag zSign… in subFloatx80Sigs() argument
2832 roundData->exception |= float_flag_invalid; in subFloatx80Sigs()
2845 return packFloatx80( roundData->mode == float_round_down, 0, 0 ); in subFloatx80Sigs()
2871 roundData, zSign, zExp, zSig0, zSig1 ); in subFloatx80Sigs()
2882 floatx80 floatx80_add( struct roundingData *roundData, floatx80 a, floatx80 b ) in floatx80_add() argument
2889 return addFloatx80Sigs( roundData, a, b, aSign ); in floatx80_add()
2892 return subFloatx80Sigs( roundData, a, b, aSign ); in floatx80_add()
2904 floatx80 floatx80_sub( struct roundingData *roundData, floatx80 a, floatx80 b ) in floatx80_sub() argument
2911 return subFloatx80Sigs( roundData, a, b, aSign ); in floatx80_sub()
2914 return addFloatx80Sigs( roundData, a, b, aSign ); in floatx80_sub()
2926 floatx80 floatx80_mul( struct roundingData *roundData, floatx80 a, floatx80 b ) in floatx80_mul() argument
2952 roundData->exception |= float_flag_invalid; in floatx80_mul()
2976 roundData, zSign, zExp, zSig0, zSig1 ); in floatx80_mul()
2987 floatx80 floatx80_div( struct roundingData *roundData, floatx80 a, floatx80 b ) in floatx80_div() argument
3018 roundData->exception |= float_flag_invalid; in floatx80_div()
3024 roundData->exception |= float_flag_divbyzero; in floatx80_div()
3058 roundData, zSign, zExp, zSig0, zSig1 ); in floatx80_div()
3069 floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b ) in floatx80_rem() argument
3097 roundData->exception |= float_flag_invalid; in floatx80_rem()
3158 roundData, zSign, bExp + expDiff, aSig0, aSig1 ); in floatx80_rem()
3169 floatx80 floatx80_sqrt( struct roundingData *roundData, floatx80 a ) in floatx80_sqrt() argument
3189 roundData->exception |= float_flag_invalid; in floatx80_sqrt()
3235 roundData, 0, zExp, zSig0, zSig1 ); in floatx80_sqrt()