From 153c1ea05a49f74641ec281cd58ae535cf5ac8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 28 Mar 2017 16:20:54 +0200 Subject: [PATCH] [apps/statistics] Fix bug in quartile methods Change-Id: I50e039a2fd99162728269c8e38c4eb5087171596 --- apps/statistics/store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/statistics/store.cpp b/apps/statistics/store.cpp index 4e02d1adf..a40ff98b1 100644 --- a/apps/statistics/store.cpp +++ b/apps/statistics/store.cpp @@ -199,7 +199,7 @@ float Store::sortedElementNumber(int k) { float bufferValues[m_numberOfPairs]; memcpy(bufferValues, m_data[0], m_numberOfPairs*sizeof(float)); int sortedElementIndex = 0; - int cumulatedSize = 0; + float cumulatedSize = 0.0f; while (cumulatedSize < k) { sortedElementIndex = minIndex(bufferValues, m_numberOfPairs); bufferValues[sortedElementIndex] = FLT_MAX;