Lines Matching defs:exponent

111 /* Return the value of a decimal exponent of the form
114 If the exponent overflows, returns a large exponent with the
133 assert(absExponent < 10U && "Invalid character in exponent");
139 assert(value < 10U && "Invalid character in exponent");
150 assert(p == end && "Invalid exponent in exponent");
166 int exponent = 0;
182 assert(value < 10U && "Invalid character in exponent");
195 exponent = unsignedExponent;
197 exponent = -exponent;
198 exponent += exponentAdjustment;
199 if (exponent > 32767 || exponent < -32768)
204 exponent = negative ? -32768: 32767;
206 return exponent;
234 where the decimal point and exponent are optional, fill out the
241 the return exponent is zero.
246 int exponent;
258 D->exponent = 0;
278 D->exponent = readExponent(p + 1, end);
285 /* If number is all zeroes accept any exponent. */
297 D->exponent += static_cast<APFloat::ExponentType>((dot - p) - (dot > p));
298 D->normalizedExponent = (D->exponent +
600 exponent = rhs.exponent;
688 return isFiniteNonZero() && (exponent == semantics->minExponent) &&
696 // denormal, i.e. the floating point number with exponent being minimum
697 // exponent and significand bitwise equal to 1 (i.e. with MSB equal to 0).
698 return isFiniteNonZero() && exponent == semantics->minExponent &&
749 // number with maximum exponent and with significand that is all ones.
750 return isFiniteNonZero() && exponent == semantics->maxExponent
764 else if (isFiniteNonZero() && exponent!=rhs.exponent)
783 exponent = ourSemantics.precision - 1;
874 assert(exponent == rhs.exponent);
889 assert(exponent == rhs.exponent);
927 exponent += rhs.exponent;
937 // exponent accordingly.
938 exponent += 1;
956 exponent -= extendedPrecision - omsb;
986 // poision "2*precision - 1" to "precision - 1". The exponent need to be
988 exponent -= precision;
1004 exponent += bits;
1045 exponent -= rhs.exponent;
1052 exponent += bit;
1059 exponent -= bit;
1067 exponent--;
1116 /* Our exponent should not overflow. */
1117 assert((ExponentType) (exponent + bits) >= exponent);
1119 exponent += bits;
1124 /* Shift the significand left BITS bits, subtract BITS from its exponent. */
1134 exponent -= bits;
1149 compare = exponent - rhs.exponent;
1181 exponent = semantics->maxExponent;
1240 /* Before rounding normalize the exponent of fcNormal numbers. */
1246 the exponent. */
1249 /* If the resulting exponent is too high, overflow according to
1251 if (exponent + exponentChange > semantics->maxExponent)
1254 /* Subnormal numbers have exponent minExponent, and their MSB
1256 if (exponent + exponentChange < semantics->minExponent)
1257 exponentChange = semantics->minExponent - exponent;
1300 exponent = semantics->minExponent;
1307 /* Renormalize by incrementing the exponent and shifting our
1309 maximum exponent we overflow to infinity. */
1310 if (exponent == semantics->maxExponent) {
1404 /* Are we bigger exponent-wise than the RHS? */
1405 bits = exponent - rhs.exponent;
1818 // If the exponent is large enough, we know that this value is already
1821 if (isFiniteNonZero() && exponent+1 >= (int)semanticsPrecision(*semantics))
1963 // has larger exponent range than the source semantics (this can happen
1965 // right shift could lose result mantissa bits. Adjust exponent instead
1969 if (exponent + exponentChange < toSemantics.minExponent)
1970 exponentChange = toSemantics.minExponent - exponent;
1975 exponent += exponentChange;
2073 if (exponent < 0) {
2076 /* For exponent -1 the integer bit represents .5, look at that.
2078 truncatedBits = semantics->precision -1U - exponent;
2080 /* We want the most significant (exponent + 1) bits; the rest are
2082 unsigned int bits = exponent + 1U;
2224 exponent = omsb - 1;
2229 exponent = precision - 1;
2309 exponent = 0;
2349 /* Hex floats require an exponent but not a hexadecimal point. */
2350 assert(p != end && "Hex strings require an exponent");
2355 /* Ignore the exponent if we are zero. */
2363 /* Calculate the exponent adjustment implicit in the number of
2375 /* Adjust for the given exponent. */
2376 exponent = totalExponent(p + 1, end, expAdjustment);
2416 decSig.exponent += exp;
2429 if (decSig.exponent < semantics->minExponent) {
2430 excessPrecision += (semantics->minExponent - decSig.exponent);
2435 /* Extra half-ulp lost in reciprocal of exponent. */
2454 /* Take the exponent of decSig. If we tcExtract-ed less bits
2455 above we must adjust our exponent to compensate for the
2457 exponent = (decSig.exponent + semantics->precision
2500 // exponent, then we know that D.firstSigDigit will be non-numeric.
2505 /* Check whether the normalized exponent is high enough to overflow
2506 max during the log-rebasing in the max-exponent check below. */
2511 during the log-rebasing in the min-exponent check. Check that it
2512 won't overflow min in either check, then perform the min-exponent
2522 /* We can finally safely perform the max-exponent check. */
2577 D.exponent, rounding_mode);
2650 The decimal exponent is always printed and has at least one digit.
2651 Zero values display an exponent of zero. Infinities and NaNs
2656 uses whatever is necessary so that the exponent is displayed as
2657 stored. This implies the exponent will fall within the IEEE format
2808 /* Finally output the exponent. */
2811 return writeSignedDecimal (dst, exponent);
2821 // Normal floats need their exponent and significand hashed.
2823 Arg.semantics->precision, Arg.exponent,
2835 // Denormals have exponent minExponent in APFloat, but minExponent-1 in
2847 myexponent = exponent+16383; //bias
2930 myexponent = exponent+16383; //bias
2966 myexponent = exponent+1023; //bias
2996 myexponent = exponent+127; //bias
3025 myexponent = exponent+15; //bias
3092 /// exponent = all 1's, integer bit 0, significand 0 ("pseudoinfinity")
3093 /// exponent = all 1's, integer bit 0, significand nonzero ("pseudoNaN")
3094 /// exponent = 0, integer bit 1 ("pseudodenormal")
3095 /// exponent!=0 nor all 1's, integer bit 0 ("unnormal")
3111 // exponent, significand meaningless
3114 // exponent, significand meaningless
3117 // exponent meaningless
3123 exponent = myexponent - 16383;
3127 exponent = -16382;
3173 // exponent, significand meaningless
3177 // exponent, significand meaningless
3181 // exponent meaningless
3187 exponent = myexponent - 16383;
3191 exponent = -16382;
3210 // exponent, significand meaningless
3213 // exponent, significand meaningless
3216 // exponent meaningless
3221 exponent = myexponent - 1023;
3224 exponent = -1022;
3243 // exponent, significand meaningless
3246 // exponent, significand meaningless
3249 // sign, exponent, significand meaningless
3254 exponent = myexponent - 127; //bias
3257 exponent = -126;
3276 // exponent, significand meaningless
3279 // exponent, significand meaningless
3282 // sign, exponent, significand meaningless
3287 exponent = myexponent - 15; //bias
3290 exponent = -14;
3345 // exponent = 1..10
3349 exponent = semantics->maxExponent;
3368 // exponent = 0..0
3372 exponent = semantics->minExponent;
3380 // exponent = 1..10
3390 // exponent = 0..0
3402 // exponent = 0..0
3408 Val.exponent = Sem.minExponent;
3540 // Decompose the number into an APInt and an exponent.
3541 int exp = exponent - ((int) semantics->precision - 1);
3564 // Change the exponent from 2^e to 10^e.
3792 exponent = 0;
3800 exponent = semantics->maxExponent + 1;
3808 // We only cross a binade boundary that requires adjusting the exponent
3810 // 1. exponent != semantics->minExponent. This implies we are not in the
3814 exponent != semantics->minExponent && isSignificandAllZeros();
3825 // must just adjust the exponent and set the integral bit to 1.
3835 // 2. Decrement the exponent.
3837 exponent--;
3842 // We only cross a binade boundary that requires adjusting the exponent if
3845 // the integral bit to 1, and increment the exponent. If we have a
3847 // smallest normal binade have the same exponent in our representation.
3854 assert(exponent != semantics->maxExponent &&
3855 "We can not increment an exponent beyond the maxExponent allowed"
3857 exponent++;
3876 exponent = semantics->maxExponent + 1;
3884 exponent = semantics->minExponent-1;