MCPcopy Create free account
hub / github.com/apache/datafusion / hll_sigma

Function hll_sigma

datafusion/functions-aggregate/src/hyperloglog.rs:164–182  ·  view source on GitHub ↗
(x: f64)

Source from the content-addressed store, hash-verified

162/// Otmar Ertl, arXiv:1702.01284
163#[inline]
164fn hll_sigma(x: f64) -> f64 {
165 if x == 1. {
166 f64::INFINITY
167 } else {
168 let mut y = 1.0;
169 let mut z = x;
170 let mut x = x;
171 loop {
172 x *= x;
173 let z_prime = z;
174 z += x * y;
175 y += y;
176 if z_prime == z {
177 break;
178 }
179 }
180 z
181 }
182}
183
184/// Helper function tau as defined in
185/// "New cardinality estimation algorithms for HyperLogLog sketches"

Callers 1

countMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…