jaideeppyne opened a new pull request, #531: URL: https://github.com/apache/datasketches-cpp/pull/531
The C++ t-digest still disagrees with the Java, Go, and Rust sketches on three quantile and rank cases those ports already fixed. - `get_rank()` did not divide the left tail by the total centroid weight, so a value below the first centroid could report a rank greater than 1. The right tail was already normalized. - `get_quantile()` added the right-tail offset onto the maximum, so estimates could land above the stored max. The tail is measured back from the maximum. A last centroid of weight 2 makes that division 0/0, and the only rank that reaches it is the maximum itself, so return the maximum. - Interpolation weighted each centroid by the distance to itself. Weighting by the distance to the other centroid pulls the estimate toward the nearer one. The new tests follow the Java cases: quantiles over 10k updates stay monotonic and inside `[min, max]`, a byte-patched heavy first centroid keeps ranks inside `[0, 1]`, a heavy last centroid never exceeds max, weight 2 returns max rather than NaN, and an asymmetric interior point returns 13 rather than 17. Tests: `tdigest_test` (55 cases). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
