Fix floating point exception in qwp, fixes #923
authorClifford Wolf <clifford@clifford.at>
Wed, 1 May 2019 13:06:46 +0000 (15:06 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 1 May 2019 13:06:46 +0000 (15:06 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
passes/cmds/qwp.cc

index 1c64a7b77015258d01ea71ad99c647f0fcb1d9e3..adbe89e315f3c97a969f7ec5d3e46e3c7821fd95 100644 (file)
@@ -291,7 +291,7 @@ struct QwpWorker
                // gaussian elimination
                for (int i = 0; i < N; i++)
                {
-                       if (config.verbose && ((i+1) % (N/15)) == 0)
+                       if (config.verbose && N > 15 && ((i+1) % (N/15)) == 0)
                                log("> Solved %d%%: %d/%d\n", (100*(i+1))/N, i+1, N);
 
                        // find best row