Skip to content

Commit a7d4055

Browse files
Merge pull request #462 from apache/fix_tdigest
porting bug fix from Java
2 parents f956339 + 2e92ea0 commit a7d4055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tdigest/include/tdigest_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ T tdigest<T, A>::get_quantile(double rank) const {
193193
}
194194
const double w1 = weight - centroids_weight_ - centroids_.back().get_weight() / 2.0;
195195
const double w2 = centroids_.back().get_weight() / 2.0 - w1;
196-
return weighted_average(centroids_.back().get_weight(), w1, max_, w2);
196+
return weighted_average(centroids_.back().get_mean(), w1, max_, w2);
197197
}
198198

199199
template<typename T, typename A>

0 commit comments

Comments
 (0)