Re: [Ledger-smb-devel] Proposal for 2.0: New monetary data types

2010-04-04 Thread Chris Travers
On Sun, Apr 4, 2010 at 7:11 PM, Adam Thompson wrote: >> Also all math within the function should be integer math, and the >> return >> result should be left as full precision real. >> This will avoid all rounding error. >> The result can then be rounded at application level. > > It's impossible (A

Re: [Ledger-smb-devel] Proposal for 2.0: New monetary data types

2010-04-04 Thread Adam Thompson
> Also all math within the function should be integer math, and the > return > result should be left as full precision real. > This will avoid all rounding error. > The result can then be rounded at application level. It's impossible (AFAIK) to avoid all rounding errors in monetary amounts as lon

Re: [Ledger-smb-devel] Proposal for 2.0: New monetary data types

2010-04-04 Thread David Godfrey
Hi Chris, If I may make a suggestion Overall I like this new model, but I would propose that consideration be given to designing the 2 functions with notes and coin in mind. NOTE: EXAMPLES BELOW assume notes will be whole amounts and coins are fractional amounts, in the real world this may

Re: [Ledger-smb-devel] Proposal for 2.0: New monetary data types

2010-04-04 Thread Chris Travers
On Sat, Apr 3, 2010 at 5:14 AM, Alejandro Imass wrote: > On Fri, Apr 2, 2010 at 2:06 PM, Chris Travers wrote: > Awesome ideas. I have thought of taking this a step further and > instead of having a base currency in a particular coin, a > multi-currency system could have a high precision "base va