]> granicus.if.org Git - graphviz/commitdiff
lu_decompose: rephrase an open coded fmax
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 11 Sep 2021 17:09:53 +0000 (10:09 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Sep 2021 02:31:32 +0000 (19:31 -0700)
lib/neatogen/lu.c

index ad4e550ff4d5186291f97dc13c287f46d4eaa5b1..e0e013ae9892d3b44ceceaaa478bf9ae8daf09c3 100644 (file)
@@ -79,8 +79,7 @@ int lu_decompose(double **a, int n)
        /* Find the largest element in each row for row equilibration */
        biggest = 0.0;
        for (j = 0; j < n; j++)
-           if (biggest < (tempf = fabs(lu[i][j] = a[i][j])))
-               biggest = tempf;
+           biggest = fmax(biggest, fabs(lu[i][j] = a[i][j]));
        if (biggest != 0.0)
            scales[i] = 1.0 / biggest;
        else {