From: Matthew Fernandez Date: Tue, 15 Feb 2022 08:22:55 +0000 (+1100) Subject: neatogen: replace float-casted calls to 'fabs' with calls to 'fabsf' X-Git-Tag: 3.0.0~26^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e67848a23da03a75d4bcf2063744b2df86f75f71;p=graphviz neatogen: replace float-casted calls to 'fabs' with calls to 'fabsf' This is simpler, more efficient, and clearer to the compiler. --- diff --git a/lib/neatogen/matrix_ops.c b/lib/neatogen/matrix_ops.c index d13ced562..417609b1d 100644 --- a/lib/neatogen/matrix_ops.c +++ b/lib/neatogen/matrix_ops.c @@ -585,7 +585,7 @@ double max_absf(int n, float *vector) float max_val = -1e30f; for (i = 0; i < n; i++) if (fabs(vector[i]) > max_val) - max_val = (float) (fabs(vector[i])); + max_val = fabsf(vector[i]); return max_val; }