Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to translate this Math Formula in Haskell or Python? (Was translated in PHP)
    primarykey
    data
    text
    <p>I'm trying to convert a Math Formula into PHP code.</p> <p>You can see the formula in the accepted answer here: <a href="https://math.stackexchange.com/questions/92942/applying-a-math-formula-in-a-more-elegant-way-maybe-a-recursive-call-would-do-t">Applying a Math Formula in a more elegant way (maybe a recursive call would do the trick)</a>.</p> <p>I'm not a professional coder so I'm trying my best to translate it but my skills are limited and I've encountered several problems.</p> <p>Let's start.</p> <p>There's a vector containing players' stacks: I think a bidimensional array should do the work here. I'd add a key to identify each player.</p> <pre><code>$array = array(1 =&gt; 2000, 3 =&gt; 5000 ...); </code></pre> <p>Now he wants to create a Matrix of values, I did my researches and found a PEAR package called Math_Matrix, installed it but I'm wondering how to create that sort of matrix.</p> <p>I'm worried that I won't be able to translate the entire code because he uses advances methods like recursive calls etc.</p> <p>Could you help me?</p> <p><em>EDIT: OLD BOUNTY REWARD</em></p> <p>I tried what you've suggested but I feel like wasting my time because of my poor-programming skills.</p> <p>I'VE DECIDED TO OFFER A 50 BOUNTY IF SOMEONE WANTS TO HELP ME BY TRANSLATING THAT FORMULA IN PHP.</p> <p>Note that if you think that translating in Python is easier/more suitable/other, please provide me a way to include the Python script inside a PHP script since I'm planning to use this formula in a website.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload