Server side weird sum result

This is baffling me:

I’m adding up price_excluding and tax_amount and this is the total I get

image

Calculation:

Why on earth is it adding 000000000001?

If you convert decimal numbers to integers for the calculations, that should solve the problem. These might be helfpul:
https://floating-point-gui.de/

Thanks Tom, had no idea this goes beyond Wappler. Didn’t even bother googling, just assumed it’s a Wappler thing.

So converting to integers would mean not having decimals I think. And thus in my case (money calculations) I’d better convert it all to cents and calculate with that.
Or do you see a simpler solution?

As far as I know, that would be the best and simplest solution.

1 Like