diff --git a/src/bench/examples.cpp b/src/bench/examples.cpp index dcd615b9da269..72a9922e94e51 100644 --- a/src/bench/examples.cpp +++ b/src/bench/examples.cpp @@ -13,7 +13,7 @@ static void Trig(benchmark::Bench& bench) { double d = 0.01; bench.run([&] { - sum += sin(d); + sum = sum + sin(d); d += 0.000001; }); }