(08-21-2018, 01:39 PM)cyberTripping Wrote: idk jack about shit but couldn't some cleanup events just get rid of incredibly small chemical units, or is that not how byond works?
Not really. You technically could make something that throws out numbers smaller than 10^-6 or something, but it would be a bad idea for several reasons.
The largest is that it would add complexity to the code and hurt efficiency. So I think most people would agree that doing so is not worth the performance sacrifice since chem reactions do in fact already put a strain on the server at times. Now you might say, just change it in this specific instance. Again, not a terrible idea, but doing things like that for things where it's not 100% necessary can make the code very hard to maintain. It's just a drop in the ocean, but what is an ocean but a multitude of drops?
The other thing that needs to be mentioned here is this, Byond doesn't allow for you to cast numbers in a way to keep absolute precision. AFAIK. All Byond number types are floats and there is no simple way to work around that, like there would be if you were dealing with money transactions in Java and could just use a double type so you don't have rounding errors.
Also, if you want a more fun explanation, IRL mixing chemicals doesn't give you perfect reactions. There are impurities and stuff, just pretend that is what causes it.
So as Mordent said, just leave some more room in your beaker.