Hello, I was wondering whether anyone would be able to help me understand an odd number behaviour in my app… Namely sums of 2-decimal numbers gain multiple decimals (probably due to rounding errors) in a pie chart view. Attached are two screenshots illustrating this.

My app is about expenses. The ‘expense’ column is of type ‘Decimal’ (not ‘Price’) and set to 2 decimals. Each ‘expense’ belongs to a ‘category’ and a ‘subcategory’ (2 other columns) on a given ‘Date’.

I’ve attached an example of aggregated pie chart obtained for the category ‘Vacances’ that shows all subcategories of that one category (e.g. food, transport…). The other screenshot shows all amounts registered again ‘Vacances > Restaurant’, i.e. the red pie slice with a total of -112.14999999999. Why isn’t the total 112.15 ?

Thanks in advance for any help with this !