mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
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 <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user