There's no need to write `double((N / termfreq))` - `double(N / termfreq)` is fine, and more readable.