[GNC] Loan Mortgage repayment assistant problem

John Ralls jralls at ceridwen.us
Wed Jan 9 10:01:00 EST 2019



> On Jan 9, 2019, at 6:26 AM, Michael or Penny Novack <stepbystepfarm at comcast.net> wrote:
> 
> On 1/8/2019 11:50 PM, John Ralls wrote:
>> The answer is probably in app-utils/calculation. All of that was probably written before Guile grew a rational number class and I think that GncNumerics get converted to doubles before being passed to the interest functions. That would pretty much guarantee rounding issues.
>> 
>> Regards,
>> John Ralls
> I will repeat, this sort of "rounding error" is not a bug.
> 
> If two persons set out to perform a calculation which can be done by a number of methods with rounding involved at numerous places and no agreement as to either the method to be used or the precision maintained at each step THERE IS NO REASONABLE EXPECTATION THAT THEIR ANSWERS WILL MATCH EXACTLY.
> 
> Treated as a "bug", it might* be possible to change the code so as to match the answers of a particular lending institution, but then could be wrong for another lending institution that used different methods or rounding than the first.
> 
> Michael D Novack    << who in my working days often had to compute the "fuzz" for comparisons >>
> 
> * Might, because you have no reason to suppose that a lending institution necessarily used the same methods/rounding for car loans as for house mortgages.

Which is why GnuCash mostly uses rational numbers and no rounding for internal calculations. Using binary floating-point in financial software is a bug on its own, so that “mostly” is a bug. It needs to be “only”.

This isn’t about matching the results with someone else’s computer, this is about internal consistency in GnuCash.

Regards,
John Ralls




More information about the gnucash-user mailing list