From a2b6b1914f5146e563697438a8cb54faefeefb92 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Mon, 24 Apr 2017 06:02:36 +0000 Subject: [PATCH] Fix benchmark print_number infinite loop. --- src/bench.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bench.h b/src/bench.h index 3a71b4a..d67f08a 100644 --- a/src/bench.h +++ b/src/bench.h @@ -23,7 +23,7 @@ void print_number(double x) { if (y < 0.0) { y = -y; } - while (y < 100.0) { + while (y > 0 && y < 100.0) { y *= 10.0; c++; }