The first issue is with how it handles division with a large number (x>1000) being divided by a small number (y<100). I understand why this is slow since it only subtracts y once each time it goes through this cycle (and therefore has a ton of subtractions to do before x=0 and division is complete) but I don't know if there is a sensible way to do it faster with only addition and subtraction.
The other issue is actually a pretty serious bug in that the calculator also runs one too many times when dividing odd numbers by even numbers (at least when they are small ones) such as 7/2 since it gives an answer of 4 (though to be fair minor errors like this won't seriously effect what I'm doing) but it seems to be related to an issue with how the calculator handles 0/0 since it gives an output of 1 (i.e. the calculator seems to always run one extra time when not dealing with two even numbers) yet fixing this issue by detecting if minerals=0 and gas=1 just glitches up the whole thing. I'll need to take a better look at it.
Has anyone improved on the calculator, can it be improved?
None.