the easiest way to fix these problems (i guess) is to use ( and ) signs in your calculator, as a proper calculator will always calculate the part between (..) first. so my example will look like this: 100- (4*25) = 0
it might be hard to fix this but seen you've already created a working calculator adding those ''math rules'' shouldn't be that hard for you.
il use it anyways