<html lang="en"><head>
  <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width"> 
	<style>
		html    {    background-image: linear-gradient(to right, rgba(255,0,255,0.3), rgba(0,255,255,0.7));    }
		input	{	width:100px;	}
	</style></head><body>
	<b>Useful links:</b> Latest <a href="https://github.com/itsN1X/8621_infty_die/releases">releases↗</a> | Download <a href="https://github.com/itsN1X/8621_infty_die/">instructions↗</a>
	
	<hr>

<input id="n1" placeholder="iini">
<input id="n2" placeholder="iinc">
<input id="n3" placeholder="iite">
<input id="n0" placeholder="winc">
<button type="button" onclick="fr()">Re-set</button>
<button type="button" onclick="fw()">Get W</button>
<button type="button" onclick="fg()">Get G</button>
<button type="button" onclick="fp()">Get P</button>
<button type="button" onclick="f1()">Get distributions</button>
<p id="de"></p>

<script>

var profit = (d,a,b,c) => {
    return parseFloat((((d*win(a,b,c)) - gps(a,b,c))).toFixed(8));
}

var win = (a,b,c) => {
    return parseFloat(((b**(c-1))*a).toFixed(8));
}

var gps = (a,b,c) => {
    return parseFloat((((b**c-1)/(b-1))*a).toFixed(8));
}
  
function fg() {

  x = document.getElementById("n1").value;
  y = document.getElementById("n2").value;
  z = document.getElementById("n3").value;
  document.getElementById("de").innerHTML += gps(x,y,z) + "<br>";
}
function fr() {
 document.getElementById("de").innerHTML ="";
}
function fw() {

  x = document.getElementById("n1").value;
  y = document.getElementById("n2").value;
  z = document.getElementById("n3").value;
  document.getElementById("de").innerHTML += win(x,y,z) + "<br>";
}
function fp() {

  w = document.getElementById("n0").value;
  x = document.getElementById("n1").value;
  y = document.getElementById("n2").value;
  z = document.getElementById("n3").value;
  document.getElementById("de").innerHTML += profit(w,x,y,z) + "<br>";
}
function f1() {

  w = document.getElementById("n0").value;
  x = document.getElementById("n1").value;
  y = document.getElementById("n2").value;
  z = document.getElementById("n3").value;
    ft(w,x,y,z); 
}

function ft(w,x,y,z) {
var i;
    for (i=1;i<=z;i++){
        q = profit(w,x,y,i).toFixed(8);
        qq = (((1/w) * ( (1-(1/w)**i) / (1-(1/w)) ))*100).toFixed(8);
        qqq = (x*(y**(i-1))).toFixed(8);
        qqqq = (100*q/qqq).toFixed(8);
            document.getElementById("de").innerHTML += i + " : " + qqq + " > " + q + " @ " + qq + "% { " + qqqq + "%<br>";
    }
    document.getElementById("de").innerHTML += "<hr>";
}

</script>
<hr><h2>©<i id="cr"></i>
<script>d = new Date(); document.getElementById('cr').innerHTML = d.getFullYear();</script>
	<i><a href="https://www.startpage.com/sp/search?q=itsN1X">@itsN1X</a></i>
</h2>
⇨Crypto⇨Donations⇨ <a href="https://9xo.github.io/R/teb">https://9xo.github.io/R/teb</a>!<br>
<i>{₿}<a href="https://jfgi.cc/itsN1X">JfGi.cc/itsN1X</a>{฿}</i><br>
<b><i>bitcoin: </i></b>1N1X8i5VuRS1BeMxiy5ZaeensjhsVWdQeC<br>
<b><i>bitcoincash: </i></b>1TsNiXCQkPKaB6zfDQQXAwMBfe12ySoKa<br>
<b><i>bitcoincashsv: </i></b>12BYmeGuyteP4z7m4MUVZzpb1K6peP1Yx3<br>
</body></html>
</body></html>