pitrou opened a new issue, #45681:
URL: https://github.com/apache/arrow/issues/45681

   ### Describe the enhancement requested
   
   Currently, the sum function and related functions (such as mean, 
variance...) use pairwise summation to reduce catastrophic error accumulation 
when summing floating-point numbers.
   
   However, pairwise summation requires a non-trivial amount of temporary state 
(`O(log2 n)` FP numbers) while [enhanced Kuhan 
summation](https://en.wikipedia.org/wiki/Kahan_summation_algorithm#Further_enhancements)
 would require only a single FP number of temporary state.
   
   We should investigate whether replacing pairwise summation with enhanced 
Kahan summation produces results of the same (or higher) quality, with no 
performance regression. It would then open the door to using Kahan summation in 
the hash-aggregate variants of those functions, which currently use naive 
summation.
   
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to