[apps/statistics] Fix bug in quartile methods

Change-Id: I50e039a2fd99162728269c8e38c4eb5087171596
This commit is contained in:
Émilie Feral
2017-03-28 16:20:54 +02:00
parent 28b7bca7fc
commit 153c1ea05a

View File

@@ -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;