diff --git a/numerical_methods/durand_kerner_roots.cpp b/numerical_methods/durand_kerner_roots.cpp index 5d5b65bf5..395797bfc 100644 --- a/numerical_methods/durand_kerner_roots.cpp +++ b/numerical_methods/durand_kerner_roots.cpp @@ -106,7 +106,7 @@ std::pair durand_kerner_algo( std::valarray> *roots, bool write_log = false) { long double tol_condition = 1; uint32_t iter = 0; - int i, n; + int n; std::ofstream log_file; if (write_log) { @@ -149,7 +149,7 @@ std::pair durand_kerner_algo( std::complex numerator, denominator; numerator = poly_function(coeffs, (*roots)[n]); denominator = 1.0; - for (i = 0; i < roots->size(); i++) + for (int i = 0; i < roots->size(); i++) if (i != n) denominator *= (*roots)[n] - (*roots)[i];