Hyperlog log is a probablistic algorithm According to the redis HLL document , we could get 0.81% of error but I get errors like 17-20%
I think there is something wrong .. This is my simple perl test script. Is there some error
#!/usr/bin/perl -w
use Redis;
my $redis = Redis->new(server=>'192.168.50.166:6379') or die;
my $fp=0;
my $HLL="HLL";
$redis->del($HLL);
foreach my $i (1..10000) {
my $s1 = $redis->pfadd($HLL,$i);
if($s1 == 0){
print "False positive on $i\n";
$fp++;
}
}
print "count of false positives $fp\n";