static int optimalNumOfHashFunctions ( long expectEntries , long bitSize ) { return Math . max ( 1 , ( int ) Math . round ( ( double ) bitSize / expectEntries * Math . log ( 2 ) ) ) ; }
compute the optimal hash function number with given input entries and bits size which would make the false positive probability lowest .