mirror of https://github.com/apache/poi.git
increase intermediate significance
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ede439abdc
commit
a3b26c2021
|
@ -137,11 +137,12 @@ final class PercentRankExcFunction implements FreeRefFunction {
|
|||
BigDecimal result = new BigDecimal((double)(lessThanCount + 1) / (double)(numbers.size() + 1));
|
||||
return new NumberEval(PercentRank.round(result, significance));
|
||||
} else {
|
||||
ValueEval belowRank = calculateRank(numbers, closestMatchBelow, significance + 3, false);
|
||||
int intermediateSignificance = significance < 5 ? 8 : significance + 3;
|
||||
ValueEval belowRank = calculateRank(numbers, closestMatchBelow, intermediateSignificance, false);
|
||||
if (!(belowRank instanceof NumberEval)) {
|
||||
return belowRank;
|
||||
}
|
||||
ValueEval aboveRank = calculateRank(numbers, closestMatchAbove, significance + 3, false);
|
||||
ValueEval aboveRank = calculateRank(numbers, closestMatchAbove, intermediateSignificance, false);
|
||||
if (!(aboveRank instanceof NumberEval)) {
|
||||
return aboveRank;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue