tisonkun commented on code in PR #471:
URL: https://github.com/apache/datasketches-cpp/pull/471#discussion_r2680761654


##########
tdigest/include/tdigest_impl.hpp:
##########
@@ -94,6 +95,7 @@ template<typename T, typename A>
 double tdigest<T, A>::get_rank(T value) const {
   if (is_empty()) throw std::runtime_error("operation is undefined for an 
empty sketch");
   if (std::isnan(value)) throw std::invalid_argument("operation is undefined 
for NaN");
+  if (std::isinf(value)) throw std::invalid_argument("operation is undefined 
for infinity");

Review Comment:
   In datasketches-rust's impl, I only filter inf when update and deserialize, 
i.e., for inputs. Since -inf and +inf can be compared with other finite 
floating numbers, `get_rank(inf)` can be defined.



-- 
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]

Reply via email to