Fix IDF calculation

I think the formula for the IDF is log( (D+1) / Dt ) and not log( D + (1/Dt) ).