Fix benchmark print_number infinite loop.

This commit is contained in:
Gregory Maxwell 2017-04-24 06:02:36 +00:00
parent 8b7680a826
commit a2b6b1914f
1 changed files with 1 additions and 1 deletions

View File

@ -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++;
}