Select Page
Poker Forum
Over 1,292,000 Posts!
Poker ForumFTR Community

Help with Programming/Maths!

Results 1 to 8 of 8
  1. #1

    Default Help with Programming/Maths!

    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

    Code:
    x = b/y + b/ya ...
    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
    "The best blog you'll ever read. Because after you read it I will poke your fucking eyes out"
    - Martha Farqhar
    http://mattspokerbankroll.blogspot.com/
  2. #2
    ugh my head hurts gg you pwned me
  3. #3
    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
    "The best blog you'll ever read. Because after you read it I will poke your fucking eyes out"
    - Martha Farqhar
    http://mattspokerbankroll.blogspot.com/
  4. #4
    well I havent done a degree in that and I hate math IM so pwned
  5. #5
    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.
  6. #6
    gabe's Avatar
    Join Date
    Dec 2004
    Posts
    13,804
    Location
    trying to live
    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?
  7. #7
    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...
    "The best blog you'll ever read. Because after you read it I will poke your fucking eyes out"
    - Martha Farqhar
    http://mattspokerbankroll.blogspot.com/
  8. #8
    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 )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •