changed int to long long to avoid potential overflow

This commit is contained in:
lbaumberger
2026-04-26 17:39:04 +02:00
parent e46f6daf35
commit 0571e2b371
+1 -1
View File
@@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) {
p.e = (p.destination - p.curr_pos) / (p.destination - p.curr_pos).norm();
}
}
int W = (8 + 55 * n_p - 55 + 144 + 4 + 8 + 4 + 10) * n_p * n_iter;
long long W = (long long)(8 + 55 * n_p - 55 + 144 + 4 + 8 + 4 + 10) * n_p * n_iter;
std::cout << "W(n): ";
std::cout << W;
std::cout << " flops\n";