Home | History | Annotate | Download | only in Support

Lines Matching defs:precision

10 // This file implements a class to represent arbitrary precision floating
47 unsigned int precision;
647 unsigned bitsToPreserve = semantics->precision - 1;
655 unsigned QNaNBit = semantics->precision - 2;
671 // For x87 extended precision, we want to make a NaN, not a
735 exponent = ourSemantics.precision - 1;
792 return partCountForBits(semantics->precision + 1);
798 return semantics.precision;
869 on to the full-precision result of the multiplication. Returns the
875 unsigned int partsCount, newPartsCount, precision;
884 precision = semantics->precision;
885 newPartsCount = partCountForBits(precision * 2);
910 extendedPrecision = precision + precision - 1;
919 extendedSemantics.precision = extendedPrecision;
942 exponent -= (precision - 1);
944 if (omsb > precision) {
948 bits = omsb - precision;
995 unsigned int precision = semantics->precision;
998 bit = precision - APInt::tcMSB(divisor, partsCount) - 1;
1005 bit = precision - APInt::tcMSB(dividend, partsCount) - 1;
1021 for (bit = precision; bit; bit -= 1) {
1076 assert(bits < semantics->precision);
1131 semantics->precision);
1195 bit numbered PRECISION if possible, with a compensating change in
1197 exponentChange = omsb - semantics->precision;
1209 /* Shifting left is easy as we don't lose precision. */
1256 if (omsb == (unsigned) semantics->precision + 1) {
1274 if (omsb == semantics->precision)
1278 assert(omsb < semantics->precision);
1736 extended-precision calculation. */
1761 precision. */
1861 newPartCount = partCountForBits(toSemantics.precision + 1);
1883 (significandParts(), oldPartCount, toSemantics.precision);
1895 exponent += toSemantics.precision - semantics->precision;
1900 int shift = toSemantics.precision - semantics->precision;
1914 // hardware sets this bit when converting a lower-precision NaN to
1984 truncatedBits = semantics->precision -1U - exponent;
1994 if (bits < semantics->precision) {
1995 /* We truncate (semantics->precision - bits) bits. */
1996 truncatedBits = semantics->precision - bits;
2000 APInt::tcExtract(parts, dstPartsCount, src, semantics->precision, 0);
2001 APInt::tcShiftLeft(parts, dstPartsCount, bits - semantics->precision);
2094 precision of the conversion.
2117 unsigned int omsb, precision, dstCount;
2126 precision = semantics->precision;
2128 /* We want the most significant PRECISION bits of SRC. There may not
2130 if (precision <= omsb) {
2133 omsb - precision);
2134 APInt::tcExtract(dst, dstCount, src, precision, omsb - precision);
2136 exponent = precision - 1;
2290 expAdjustment += semantics->precision;
2313 parts = partCountForBits(semantics->precision + 11);
2322 calcSemantics.precision = parts * integerPartWidth - 1;
2323 excessPrecision = calcSemantics.precision - semantics->precision;
2341 /* multiplySignificand leaves the precision-th bit set to 1. */
2346 /* Denormal numbers have less precision. */
2350 if (excessPrecision > calcSemantics.precision)
2351 excessPrecision = calcSemantics.precision;
2360 (decSig.significandParts(), calcSemantics.precision - 1) == 1);
2370 calcSemantics.precision - excessPrecision,
2375 exponent = (decSig.exponent + semantics->precision
2376 - (calcSemantics.precision - excessPrecision));
2404 (exp + 1) * L <= minExponent - precision
2427 8651 * (semantics->minExponent - (int) semantics->precision)) {
2528 necessary. If HEXDIGITS is 0, the minimal precision to display the
2616 valueBits = semantics->precision + 3;
2624 precision. Otherwise, see if we are truncating. If we are,
2703 if (category==fcZero) return sign<<8 | semantics->precision ;
2704 else if (category==fcInfinity) return sign<<9 | semantics->precision;
2705 else if (category==fcNaN) return 1<<10 | semantics->precision;
2707 uint32_t hash = sign<<11 | semantics->precision | exponent<<12;
3241 unsigned N = partCountForBits(Sem.precision);
3246 if (Sem.precision % integerPartWidth != 0)
3248 (((integerPart) 1) << (Sem.precision % integerPartWidth)) - 1;
3277 Val.significandParts()[partCountForBits(Sem.precision)-1] |=
3278 (((integerPart) 1) << ((Sem.precision - 1) % integerPartWidth));
3309 /// precise than is required for the desired precision.
3376 // If we carried through, we have exactly one digit of precision.
3419 int exp = exponent - ((int) semantics->precision - 1);
3420 APInt significand(semantics->precision,
3422 partCountForBits(semantics->precision)));
3425 // truncate trailing zeros, as those are part of the precision.
3428 // precision or the active precision here for denormals.
3431 FormatPrecision = (semantics->precision * 59 + 195) / 196;
3444 significand = significand.zext(semantics->precision + exp);
3456 // <= semantics->precision + e * 137 / 59
3459 unsigned precision = semantics->precision + (137 * texp + 136) / 59;
3463 significand = significand.zext(precision);
3464 APInt five_to_the_i(precision, 5);
3479 unsigned precision = significand.getBitWidth();
3480 APInt ten(precision, 10);
3481 APInt digit(precision, 0);
3601 if (significandLSB() != semantics->precision - 1)
3611 if (reciprocal.significandMSB() + 1 < reciprocal.semantics->precision)
3615 reciprocal.significandLSB() == reciprocal.semantics->precision - 1);