From a2b59fd5bd197bb73bd1d86efa74f171b59ab06d Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Fri, 26 Sep 2014 17:28:12 +0000 Subject: [PATCH] tests: Mention binomial coefficient in hash tests. This just makes it a bit easier for someone coming in fresh to do some searches and figure out what the description means. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- tests/test-hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-hash.c b/tests/test-hash.c index f410c1614..92f0e2f79 100644 --- a/tests/test-hash.c +++ b/tests/test-hash.c @@ -129,7 +129,9 @@ test_hash_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) * Given a random distribution, the probability of at least one collision * in any set of 11 bits is approximately * - * 1 - ((2**11 - 1)/2**11)**C(33,2) + * 1 - (proportion of same_bits) + * **(binomial_coefficient(n_bits_in_data + 1, 2)) + * == 1 - ((2**11 - 1)/2**11)**C(33,2) * == 1 - (2047/2048)**528 * =~ 0.22 * -- 2.39.5