tisonkun commented on PR #471: URL: https://github.com/apache/datasketches-cpp/pull/471#issuecomment-3736718766
Allowing +Inf and -Inf in TDigest structure would cause internal NaN values during compression or merging and potentially break internal assumption. See https://github.com/apache/datasketches-java/issues/702 and https://github.com/apache/datasketches-rust/pull/23#discussion_r2622754228. > This is the behavior that any function like sum should follow. This includes mean and, in a more nuanced way, t-digest. What is the median of [0, 0, 1, +∞, +∞] ? I think it should be 1, not 0. Julia agrees: ``` julia> median([0, 0, 1, +Inf, +Inf]) 1.0 ``` If the infinities are ignored, we get the wrong answer. I agree with this at some point. But since we're free to merge/compress tdigests sketches, this may cause issues described above. -- 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]
