Re:WyHLL: The most accurate 3-bits HyperLogLog
by ithkuil on Sunday March 14, 2021 @07:11PM
(#26460460)
Thank you for the article, nice read.
Just a small nitpick, for the craic:
> Moreover, while accessing the registers, we need to compute the sum of pow(2,-register) which involves floating point math.
> [...]
> * The floating point computation was modified in order to allow for multiple operations to be performed in parallel when possible. This was just a matter of adding parens. Floating point math is not commutative, but in this case there was no loss of precision.
Floating point addition is commutative. It is not associative though.
Just a small nitpick, for the craic:
> Moreover, while accessing the registers, we need to compute the sum of pow(2,-register) which involves floating point math. > [...] > * The floating point computation was modified in order to allow for multiple operations to be performed in parallel when possible. This was just a matter of adding parens. Floating point math is not commutative, but in this case there was no loss of precision.
Floating point addition is commutative. It is not associative though.