diff --git a/src/benchmark_runner.cc b/src/benchmark_runner.cc index cb8dbc8e3e..84d5dfc5e2 100644 --- a/src/benchmark_runner.cc +++ b/src/benchmark_runner.cc @@ -371,9 +371,7 @@ double BenchmarkRunner::GetMinTimeToApply() const { } double BenchmarkRunner::GetRelAccuracy(const IterationResults& i) const { - return std::sqrt(i.seconds_pow2 / i.iters - - std::pow(i.seconds / i.iters, 2.)) / - (i.seconds / i.iters) / sqrt(i.iters); + return std::sqrt(it_res.seconds_pow2 - std::pow(i.seconds, 2.) / static_cast(i.iters)) / i.seconds; } bool BenchmarkRunner::HasSufficientTimeToApply(