EcoIssues icon indicating copy to clipboard operation
EcoIssues copied to clipboard

[Rounding] Tiny values mess up the economy

Open johnkslg opened this issue 7 years ago • 4 comments

image Stores, contracts, etc.

johnkslg avatar Jul 20 '18 02:07 johnkslg

For small enough values, it is impossible to pay off the debt since you can't enter the value into the dialog box.

Pradoxzon avatar Sep 20 '18 00:09 Pradoxzon

0.9.2.4 Still an issue, for example easy reproduce with small values and tax or with loan contract: image If you take 0,01 you should return 0,010001: image And then you have incomprehensible numbers on your account, although in UI it is now impossible to track it

SlayksWood avatar Mar 25 '21 07:03 SlayksWood

Well, take it as someone that knows a little bit about writing software for accounting - base currency unit should be a (large) int, and then you turn it into a float for display only. This way you avoid the rounding errors entirely. So count the number of cents!

ThePiachu avatar Apr 08 '21 07:04 ThePiachu

Honestly, it doesn't help that most people hate to play with big numbers. Having a log worth more than 1 currency scares them because suddenly the numbers grow too fast. But then you have the problem of value shrinking so much that you hit the floor so you end up with never paying for less than 0,01 currency and that means trash/abundant items never grow smaller so you end up with a log being worth at most 100 of those abundant items. While at the same time perpetuating this issue because the problem now becomes what is supposed to be the floor, 0,001, 0,0001?

astralenigma avatar Feb 08 '25 15:02 astralenigma