arnekuchenbecker / kitchen-planer-app

GNU General Public License v3.0
0 stars 0 forks source link

Find better data type for amounts #169

Open arnekuchenbecker opened 2 months ago

arnekuchenbecker commented 2 months ago

Floating point arithmetics leads to weird stuff like shopping lists requiring 0.49999999kg of something where it actually should be 0.5kg and so on. Fixed Point arithmetics would do away with that but naive implementations suffer from losing accuracy due to cutting of trailing digits. Figure out whether that is actually a problem and change the data type of ingredient amounts to something that allows for accurate (and human readable) numbers.