<turbo-stream action="replace" target="content"><template><turbo-frame id="content"><div><div><h3 class="strong">Exonio Rate Method</h3><p>I have one other method that seems like a candidate to consider. I installed some software that has common SpreadSheet functions. The software is called Exionio. It describes the rate function as:</p><fieldset><p>RATE</p><p>Suppose you take a loan of $50,000.00 to pay in 3 years with a monthly payment of $2,500.00. What is the rate applied to this loan?</p><p>Exonio.rate(12 * 3, 2_500, -50_000) # ==> 0.036006853458478955</p><p>Period is first argument,Payment the second and Total the last, the rate applied in this exampleis 3.60%.</p></fieldset><p>I call this function with</p><ul><li>@rate = Exonio.rate(@places_paid, @dues,0, -@purse)</li></ul><p>I only semi-remember how I figured this out but</p><ul><li>Period is places_paid</li><li>You pay dues each period for each player</li><li>At the end you should have the purse/pot</li><li>You pay the last place team dues (they won $dues)</li><li>For each other player, you pay the rate * the previous players winnings (dues for last place winners).</li></ul><p>This gives a pretty even distribution. Problem is setting last place winner to dues. I'll have to look at it more since when I changed dues, it created an error.</p><table class="small-table-stripped"><tr><td>10</td><td>$60</td><td class="text-right">$20.00</td><td class="text-right">$15.00</td><td class="text-right">$11.00</td><td class="text-right">$8.00</td><td class="text-right">$6.00</td></tr></table></div></div></turbo-frame></template></turbo-stream>