MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hllSigma

Function hllSigma

app/redis-6.2.6/src/hyperloglog.c:971–983  ·  view source on GitHub ↗

Helper function sigma as defined in * "New cardinality estimation algorithms for HyperLogLog sketches" * Otmar Ertl, arXiv:1702.01284 */

Source from the content-addressed store, hash-verified

969 * "New cardinality estimation algorithms for HyperLogLog sketches"
970 * Otmar Ertl, arXiv:1702.01284 */
971double hllSigma(double x) {
972 if (x == 1.) return INFINITY;
973 double zPrime;
974 double y = 1;
975 double z = x;
976 do {
977 x *= x;
978 zPrime = z;
979 z += x * y;
980 y += y;
981 } while(zPrime != z);
982 return z;
983}
984
985/* Helper function tau as defined in
986 * "New cardinality estimation algorithms for HyperLogLog sketches"

Callers 1

hllCountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected