diff --git a/misc/math.h b/misc/math.h index 0129a64..d55c762 100644 --- a/misc/math.h +++ b/misc/math.h @@ -60,9 +60,9 @@ constexpr IntegralType powerModulo(const IntegralType base, const IntegralType e template , std::is_unsigned> * = nullptr> constexpr IntegralType inverseModulo(IntegralType number, IntegralType module) { - IntegralType y1 = 0, y2 = 1, tmp; + IntegralType y1 = 0, y2 = 1; while (number != 1) { - tmp = y1 - (module / number) * y2; + IntegralType tmp = y1 - (module / number) * y2; y1 = y2; y2 = tmp; tmp = module % number;