From 755a478d7f6e7159a22b15b46268e5e33e6db073 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 17 Jan 2025 08:17:13 -0800 Subject: [PATCH] Fix bug with rate calculation on test page. --- test.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.html b/test.html index e11a480..d348c2d 100644 --- a/test.html +++ b/test.html @@ -37,12 +37,12 @@ SPDX-License-Identifier: GPL-3.0-or-later logarithms += Math.log(times[i]) min = Math.min(min, times[i]) max = Math.max(max, times[i]) - if (count > 2 && i > (count * 0.1) && i < (count * 0.9)) truncated += times[i] + if (count < 3 || (i > (count * 0.1) && i < (count * 0.9))) truncated += times[i] } return { count: count, total: sum, - rate: count / truncated * 1000, + rate: 1000 * count / (truncated || sum), min: min, max: max, arithmetic: sum / count, -- 2.34.1