lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello!

Has someone any experience to share about implementing a system that deals with currency values? I have already been bitten by the problems described in http://floating-point-gui.de/ and I want to find a better way.

It is mentioned in that guide and elsewhere about using fixed-point arithmetic (https://en.wikipedia.org/wiki/Fixed-point_arithmetic even mentions GnuCash took the same route), and from what I read, it is implemented using scaled integers, pretty much. Is that it? Has anyone some insights? 

Thank you!

PS.: Some side tips in this list do stand out for me, like the http://floating-point-gui.de/ previously mentioned. Thanks!