[GNC] Loan Mortgage repayment assistant problem

John Ralls jralls at ceridwen.us
Tue Jan 8 23:50:28 EST 2019


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

> On Jan 8, 2019, at 5:46 PM, Christopher Lam <christopher.lck at gmail.com> wrote:
> 
> Well the SCM has numerous references to "round" and "rounding errors" so it's to be expected.
> 
> Please file a bug with example numbers, and hopefully these errors may be fixed.
> 
> On 9/1/19 7:35 am, David Carlson wrote:
>> John,
>> 
>> Thanks for the reference.  Alas, I will need to do some homework to
>> properly read SCM.  There must still be some sort of rounding issue
>> creeping in if the Scheduled Transaction SLR sometimes generates an
>> imbalance from ppmt = pmt - ipmt.
>> 
>> David C
>> 
>> On Tue, Jan 8, 2019 at 3:44 PM John Ralls <jralls at ceridwen.us> wrote:
>> 
>>> The thee functions are defined in
>>> https://github.com/Gnucash/gnucash/blob/maint/libgnucash/app-utils/fin.scm,
>>> prefixed with gnc: (so gnc:ipmt etc.).
>>> 
>>> At line 41ff you'll see that ppmt = pmt - ipmt.
>>> 
>>> Regards,
>>> John Ralls
>>> 
>>> 
>>>> On Jan 8, 2019, at 12:48 PM, David Carlson <david.carlson.417 at gmail.com>
>>> wrote:
>>>> My point is that the equations are defined by the assistant, and I think
>>> that they can be expressed in a form that concentrates all the errors into
>>> one line where a simple rounding would not generate a problem where the
>>> parts do not add up to 100%.  Granted, the errors may sometimes cause
>>> inaccurate results, but they would not add the imbalance line to the
>>> transaction.
>>>> The current equations are three  evaluations called pmt(numbers),
>>> ppmt(numbers) and ipmt(numbers) with no clue how they are actually
>>> evaluated.
>>>> Apparently pmt is not always the sum of ppmt and ipmt. when rounding
>>> happens.  If ipmt were expressed as pmt-ppmt, there would be no imbalance,
>>> but one of the other two ways to express all three may be less likely to
>>> generate inaccurate results.
>>>> David C
>>>> 
>>>> On Mon, Jan 7, 2019 at 10:19 PM John Ralls <jralls at ceridwen.us> wrote:
>>>> 
>>>> 
>>>>> On Jan 7, 2019, at 3:14 PM, David Carlson <david.carlson.417 at gmail.com>
>>> wrote:
>>>>> I just had a scheduled transaction that was set up by the loan/mortgage
>>>>> repayment assistant appear with 0.01 Imbalance-USD.
>>>>> 
>>>>> I would think that GnuCash should have an accuracy method that would
>>>>> prevent this from happening.  Is this a bug?
>>>>> 
>>>>> I am using GnuCash 2.6.17 in Ubuntu 16.04 today.
>>>> The accuracy method is what created the imbalance entry. ;-)
>>>> 
>>>> There’s nothing in the SX system to pre-instantiate future scheduled
>>> transactions and ensure that they’re balanced. What would you have the
>>> check function do if it found an imbalanced case? How would you handle
>>> variables whose values are set by the user in the SLR dialog?
>>>> Regards,
>>>> John Ralls
>>>> 
>>> 
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> 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.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> 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.



More information about the gnucash-user mailing list