mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 09:17:23 +01:00
[poincare] Median computation (and quartile...) tackles imprecision
This commit is contained in:
committed by
EmilieNumworks
parent
7b88770c15
commit
02899b863b
@@ -249,7 +249,7 @@ double Store::sortedElementAtCumulatedFrequency(int series, double k, bool creat
|
||||
memcpy(bufferValues, m_data[series][0], numberOfPairsOfSeries(series)*sizeof(double));
|
||||
int sortedElementIndex = 0;
|
||||
double cumulatedFrequency = 0.0;
|
||||
while (cumulatedFrequency < k) {
|
||||
while (cumulatedFrequency < k-DBL_EPSILON) {
|
||||
sortedElementIndex = minIndex(bufferValues, numberOfPairsOfSeries(series));
|
||||
bufferValues[sortedElementIndex] = DBL_MAX;
|
||||
cumulatedFrequency += m_data[series][1][sortedElementIndex] / totalNumberOfElements;
|
||||
|
||||
Reference in New Issue
Block a user