public static int getEstimatedNumberUniqueValuesAllowingForCollisions(int setSize, int numRecordedBits) {double setSizeAsDouble = setSize;double numRecordedBitsAsDouble = numRecordedBits;double saturation = numRecordedBitsAsDouble / setSizeAsDouble;double logInverseSaturation = Math.log(1 - saturation) * -1;return (int) (setSizeAsDouble * logInverseSaturation);}
public static int GetEstimatedNumberUniqueValuesAllowingForCollisions(int setSize, int numRecordedBits){double setSizeAsDouble = setSize;double numRecordedBitsAsDouble = numRecordedBits;var saturation = numRecordedBitsAsDouble/setSizeAsDouble;var logInverseSaturation = Math.Log(1 - saturation)*-1;return (int) (setSizeAsDouble*logInverseSaturation);}