Author Topic: Help with formula!  (Read 1098 times)

nickeleo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Help with formula!
« on: December 11, 2013, 12:34:23 PM »
Hi!

I have a formula that I would like to use in my tournament season. The problem is that I just want it to work for some of the players depending on how many players there is in the tournament.

The formula:  100*sqrt(n * bc) / (r + 1.0)

With 6-8 players, 4 players get points from the formula and the rest get 300 points.
With 9-16 players, 5 players get points from the formula and the rest get 300 points.
With 16-20 players, 6 players get points from the formula and the rest get 300 points.

I'm not to good at this so I wonder if it's possible to make a formula for that?


Regards
Niclas
« Last Edit: December 12, 2013, 04:51:10 AM by nickeleo »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Help with formula!
« Reply #1 on: December 12, 2013, 12:13:31 PM »
Got a cloudy head this morning, so this could probably be done more simply, but this seems to work:

assign("pts", 100*sqrt(n * bc) / (r + 1.0))
assign("win", 300)
assign("win", if((n < 9) and (r < 5), pts, win))
assign("win", if((n > 8 ) and (n < 17) and (r < 6), pts, win))
assign("win", if((n > 16) and (r < 7), pts, win))
win

nickeleo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Help with formula!
« Reply #2 on: December 12, 2013, 12:36:39 PM »
Thank you so much Corey!! It works perfectly! :)