correct statistic computations
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Wed, 22 Oct 2025 07:40:15 +0000 (09:40 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Wed, 22 Oct 2025 07:40:22 +0000 (09:40 +0200)
stat.c

diff --git a/stat.c b/stat.c
index 0bd28c35a8ee55b07ca28911d116e3ca70468c2e..c0ec4917413022a9753280224b45a787c78a5f66 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -17,9 +17,9 @@ void compute_statistics (dts_t *points, int nb, int bins)
 
     /* compute average, minimum and maximum */
 
-    double avg = 0;
-    double min = points[1];
-    double max = points[1];
+    double avg = points[0];
+    double min = points[0];
+    double max = points[0];
 
     for (int i = 1; i < nb; i++) {
         double pt = points[i];