changed int to long long to avoid potential overflow
This commit is contained in:
@@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
p.e = (p.destination - p.curr_pos) / (p.destination - p.curr_pos).norm();
|
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(n): ";
|
||||||
std::cout << W;
|
std::cout << W;
|
||||||
std::cout << " flops\n";
|
std::cout << " flops\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user