Banks here cannot round up (charge above the contracted/advertised rate), so their calculations are truncated. However, many are lured into using computer binary floating point numbers to do money (Sybase, SQL Server), and it can lose a tiny fraction of a cent, and so lose the last cent (1.0 / 3.0 = .3333333333333333 * 3 = .9999999999999999, which truncates to 0). My last code change at Bank of America was to add a very tiny bit to balance transfer fees so that cent was not lost, not to satisfy the bank, but to satisfy testers validating a huge software update.
Interest calculations are usually the sum of all daily balances * interest rate / count of days, truncated down so they do not charge more than advertised, maybe a penny short. Good luck programming all the possible variations in the real world: a) rounding up/down by any of several rounding rules (see wiki), b) truncation (convert to integer) blindly, or c) adding a tiny bit before truncating to the now fractionally perfect sum. https://en.wikipedia.org/wiki/Rounding Good luck! I just enter the number they compute. _______________________________________________ gnucash-user mailing list [email protected] To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.
