|
DogOnMySide
|
03-28-2006, 08:37 PM
Post subject: Help with Programming/Maths!
|
#1 (permalink)
|
|
Flush
Join Date: Apr 2005
Location: Manchester, UK
Posts: 458
|
|
Ok... here's an iterative formula which works in my program
Code:
for i = 0 to t
B=B+xy(a^i)
next
basically I am trying to work out B.
I KNOW x, y and a... they're constants. It's fairly simple when you replace them with numbers.
It's the same as saying
Code:
B = xy(a^0) + xy(a^1) + xy(a^2)... and so on
What i need to do is write a similar loop or function or whatever which allows me to calculate x, assuming i know B.
It might be something like
Do you see what I mean? I can't figure it out! this is for that bankroll calculator, by the way!
I am 27. I last did this shit when i was 21. That is a long time
If anyone knows what a for..next loop is and can do algebra/math but doesnt understand the question then please post because i might be able to explain it better
|
|
|
Play for FREE and practice your game at...
Join the FTR Poker Forum to disable these banners and start posting!
|
|
shysti
|
|
Full House
Join Date: Sep 2005
Location: The Internetz
Posts: 838
|
|
ugh my head hurts gg you pwned me
|
|
|
|
DogOnMySide
|
|
Flush
Join Date: Apr 2005
Location: Manchester, UK
Posts: 458
|
|
lol
its not that difficult. someone who has done a maths or science degree (and wasn't continually stoned for all 3 years like I was) will eat it for lunch
i'm hoping for demiparadigm or someone
|
|
|
|
shysti
|
|
Full House
Join Date: Sep 2005
Location: The Internetz
Posts: 838
|
|
well I havent done a degree in that and I hate math IM so pwned
|
|
|
|
Hate
|
|
Flush
Join Date: Jul 2005
Posts: 322
|
|
unless i didn't misunderstand, that would mean that:
B=xy [ (a^0) + (a^1) + (a^2) + ... + (a^t) ]
Thus,
1/x = y/b [ (a^0) + (a^1) + (a^2) + ... + (a^t) ]
=> x = b/y [ (a^0) + (a^1) + (a^2) + ... + (a^t) ]
=> FOR 0<=i<=t x = b/y (SUM** a^i)
** Sum -> think excel sum formula...I'm sure you can handle that in programming.
|
|
|
|
gabe
|
|
Moderator
Join Date: Dec 2004
Location: trying to live
Posts: 7,964
|
|
B=B+xy(a^i)
B=xya + xya^2 + xya^3 + xya^t
B=xy(a + a^2 + a^3 + a^t)
B/y(a + a^2 + a^3 + a^t) = x
so the code is:
for i = 0 to t
C=C+(a^t)
next
x=B/(yC)
am i close?
|
|
|
|
DogOnMySide
|
|
Flush
Join Date: Apr 2005
Location: Manchester, UK
Posts: 458
|
|
Whoa some serious responses. Thanks. They're very similar to my attempts but subtly different... going to give them a go...
To explain all the variables...
x = table buyin e.g 25 for $25NL
y = "caution factor" e.g. 20, if you want 20 * buyins for your bankroll
B = bankroll
t = number of tables you're playing...
a = multi tabling factor... the lower this is the less effect multitabling has on bankroll requirements.
If you are 3 tabling 25NL with a standard "caution factor" of 20... and we call the a factor 0.25(Thru trial and error I think this is reasonable)
then i work out that your required bankroll B is....
B = (25 * 20 * 1) + (25 * 20 *0.25) + (25 * 20 * 0.0625)
B = 656.25
So if i plug in 656.25 into the other formula, then x should come out at 25, AMIRITE?
gabe yours says...
C = 0.25^0 + 0.25^1 + 0.25^2 = 1.3125
x = 656.25/(20 * 1.3125)
x = 25
B.I.N.G.O!!!!
Hate, thanks for the help but I didn't really understand the SUM bit!!! Looks v similar though.
Thanks very much. New BR calculator will have mad props to you for the help...
|
|
|
|
Hate
|
|
Flush
Join Date: Jul 2005
Posts: 322
|
|
I'm not sure what language you're programming, but my SUM is the equivalent of the excel SIGMA formula ( http://images.google.com/images?q=tb...lhwd/sigma.gif )
|
|
|