Lines Matching defs:overflow
48 /** Computes a * b for a,b > 0 (at least until first overflow happens). */
49 static int64_t SafeMul(int64_t a, int64_t b, /*out*/ bool* overflow) {
51 *overflow = true;
56 /** Returns b^e for b,e > 0. Sets overflow if arithmetic wrap-around occurred. */
57 static int64_t IntPow(int64_t b, int64_t e, /*out*/ bool* overflow) {
63 pow = SafeMul(pow, b, overflow);
67 b = SafeMul(b, b, overflow);
1089 bool overflow = false;
1090 int64_t fpow = IntPow(f, m, &overflow);
1092 // For division, any overflow truncates to zero.
1093 if (overflow || (type != DataType::Type::kInt64 && !CanLongValueFitIntoInt(fpow))) {