(x: f64)
| 162 | /// Otmar Ertl, arXiv:1702.01284 |
| 163 | #[inline] |
| 164 | fn 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" |
no outgoing calls
no test coverage detected
searching dependent graphs…