I am trying to make a simple function that 'integrates' floats. Basically 0.3857
Becomes 3857. 2.45 becomes 245 and so on. But my code sometimes just goes mad and produces some absolutely insane results.
As you can see, if you're lucky it can work out the way you want even when the number cannot be stored exactly, but sometimes you are not so lucky. Floating point values are best used as approximations only. If you need the numbers to be exact you probably should use some other way of storing them.