get_collection_size() and get_collection_freq() both return unsigned integers, so dividing one by the other will do an integer division, which isn't what we want to do.  If you remove the extra brackets, it'll actually work better, as if one argument is a double, the operation will be done using floating point, so something like:

```
...  * log2( wdf_lower * get_average_length() / len_upper * get_collection_size() / get_collection_freq()) + ...
```

It might be clearer to put get_collection_size(), etc into temporary doubles though - if you use N, F, etc as you have elsewhere, this will shorten this long formula a lot.