Skip to content

Instantly share code, notes, and snippets.

@PauleBertt
Created May 18, 2021 17:52
Show Gist options
  • Save PauleBertt/c00b35a5909c5ecd6e1562f20874ae40 to your computer and use it in GitHub Desktop.
Save PauleBertt/c00b35a5909c5ecd6e1562f20874ae40 to your computer and use it in GitHub Desktop.
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
BigInteger supply = new BigInteger("0");
BigInteger adder = new BigInteger("2100000000000000");
for (int i = 0; i < 35; i++) {
String upper = "0";
String lower = "";
if(supply.toString().length() > 1){
upper = supply.toString().substring(0,8);
lower = supply.toString().substring(8);
}
System.out.println(i + " Supply: " + supply + " " + (upper+","+lower) + " " + (upper+"."+lower) + " adder:" + adder);
supply = supply.add(adder);
adder = adder.divide(new BigInteger("2"));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment