was just doing some practice exercises and saw something I found a bit weird. When adding the values (that are floats) from two different objects, I get a tiny fraction of a number added to the end.
E.g. I added quantity * price from two objects. Quantity is 1 for both objects, price .1 and .2. However, instead of returning .3, it returns something like .300000000004
What's going on underneath the hood to cause this?
Subscribe to get latest updates