Commit 84f2449940 for ffmpeg

commit 84f2449940584f952db0b39cac0dbe072b13782b
Author: Kacper Michajłow <kasper93@gmail.com>
Date:   Tue Sep 22 23:05:22 2026 +0200

    avutil/tests/lls: make the printed values platform independent

    The residual variance of an exact fit ends up a few ulp below zero, so
    the square root printed for it is NaN. glibc prints it as -nan, mingw as
    nan. The coefficient of an undetermined order is rounding noise around
    zero whose sign varies the same way. Clamp the variance and print values
    below the shown precision as zero.

    Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

diff --git a/libavutil/tests/lls.c b/libavutil/tests/lls.c
index 4c14c0c4b4..c70a766a19 100644
--- a/libavutil/tests/lls.c
+++ b/libavutil/tests/lls.c
@@ -24,6 +24,13 @@
 #include "libavutil/lls.h"
 #include "libavutil/mem_internal.h"

+/* Values below the printed precision are rounding noise whose sign varies
+ * between platforms, so print them as zero. */
+static double clean(double v)
+{
+    return fabs(v) < 1e-9 ? 0.0 : v;
+}
+
 int main(void)
 {
     LLSModel m;
@@ -46,9 +53,10 @@ int main(void)
         for (order = 0; order < 3; order++) {
             eval = m.evaluate_lls(&m, var + 1, order);
             printf("real:%9f order:%d pred:%9f var:%f coeffs:%f %9f %9f\n",
-                   var[0], order, eval, sqrt(m.variance[order] / (i + 1)),
-                   m.coeff[order][0], m.coeff[order][1],
-                   m.coeff[order][2]);
+                   var[0], order, eval,
+                   sqrt(FFMAX(m.variance[order], 0) / (i + 1)),
+                   clean(m.coeff[order][0]), clean(m.coeff[order][1]),
+                   clean(m.coeff[order][2]));
         }
     }
     return 0;