I have authored a workspace that creates bills for a lot of customers. The item price on the bill has to be returned with 2 decimals, so I take the mean of all the item prices and ceil the number to 2 decimals. Because of an occasional outlier I can't rely on normal rounding function.
In the case below I have 1.173 measurements with an item price of 0,43. The min and max is 0,43 and the range is 0. But the mean value is != 0,43. And since I have to use the ceil function the price changes to 0,44.
I understand this must be caused by the internal handling of 32 to 64 bit conversion, but in this case a seemingly very simple operations doesn't work.
Why can't I rely on the mean calculation?
What can I do to rely on it in the future?