The Tournament Director Forums
Main => Help Me => Topic started by: rakrul on February 20, 2014, 08:49:05 PM

Hi.
I'm using 2.5.14 and my points formula is: (log(n/r))*n
Testing it, I get this result (with 6 players):
1st, 6, 10.75
2nd, 5, 6.59
3rd, 4, 4.16
4th, 3, 2.43
5th, 2, 1.09
6th, 1, 0.00
Which is the score I'm looking for, however when I check the formula with a calculator or Excel, I get a completely different result. Let's take 1st place as an example;
(Log (6/1)) * 6
(Log (6)) * 6
0.78 * 6 = 4.67
So how exactly is TD2 calculating my formula to reach 10.75?

The TD has two functions: log() and log10(). The log() function calculates log base E, while the log10() function calculates log base 10. Your calculator and Excel assume log base 10. That's why you get different results.
For your example, log(6/1) * 6 = 10.75, but log10(6/1) * 6 = 4.67.
The TD's log() function actually takes an optional additional parameter, which is the base. So log(6, 10) is equivalent to log10(6).

Ah got it. Thanks again for the help.