Author Topic: Need Help with a Simple Formula  (Read 1317 times)

aquinaumxefi

  • Newbie
  • *
  • Posts: 4
    • View Profile
Need Help with a Simple Formula
« on: April 27, 2010, 09:58:47 PM »
Hello,

I've just donwloaded de trial version, and get very excited with the program, but i don't know how to make our home formula work there.

The formula is:

number of players * 24 = the 1st place points.

ex: 20 players , the 1st wins 480 points, the 2nd wins 80% of 1st points (384), the 3rd wins 80% of the 2nd (307), until the last player, always using the 80% of points to get there.

How do i put this in the formula box? I really don't understand much about programming, so can anybody help me?

Ty,

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6220
    • View Profile
Re: Need Help with a Simple Formula
« Reply #1 on: April 28, 2010, 10:53:02 AM »
round((n * 24) * pow(0.8, r - 1))

This was a little challenging, because at first it seems like you've got a recursive function.  That means in order to calculate any position, you have to know the value of the position before it.  For example, to know what 10th place will receive, it's just 0.8 times the value that 9th place receives.  But in order to know what 9th place receives, you have to know what 8th place got, and so on.  So, in order to calculate 10th place's points, you have to calculate each position before it.  The Tournament Director formulas can't work this way.

The different way to approach it is to know that 2nd place gets 0.8 times 1st place, and 3rd place gets 0.8 times 0.8 times 1st place, and 4th place gets 0.8 times 0.8 times 0.8 times 1st place, and so on.

You'll probably find that due to rounding, calculating the formula this way produces slightly different results (I would argue that this way is more correct).

aquinaumxefi

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Need Help with a Simple Formula
« Reply #2 on: May 04, 2010, 06:45:20 PM »
Ty so much man! It's OK now!