Hi Adam, Thank you for creating FINERACT-2809 and including the reproducer and attribution.
I have opened the focused PR: https://github.com/apache/fineract/pull/6409 The commit is GPG-signed and verified by GitHub. I rechecked the correction against develop e4474a0f4a4c65a75e7758e47db1fd277e5fcfef: all 33 direct round trips pass. The three FinanicalFunctionsTest tests, Spotless, and main/test Checkstyle also pass through Gradle on JDK 25 in a checkout containing only this fix. The proposed integer-return contract rounds to the nearest whole payment, as documented in the patch. Full upstream CI is still to be reviewed. Best regards, Xamit Kadirbekov GERO Research пн, 7 сент. 2026 г. в 13:02, Ádám Sághy <[email protected]>: > Hi Xamit Kadirbekov, > > Thank you very much for raising awareness about this issue. I have created > the below story, you can use it to raise a PR with the enhancement: > https://issues.apache.org/jira/browse/FINERACT-2809 > > Please let us know if you are facing any issues! > > Regards, > Adam Saghy > > On Sep 5, 2026, at 7:41 PM, Khamit Kadirbekov <[email protected]> > wrote: > > Hello Fineract developers, > > I found a reproducible mathematical defect in the public > FinanicalFunctions.nop() helper. Its non-zero-rate branch is not the > algebraic inverse of the adjacent pmt() function. > > Minimal round trip: > rate = 0.01 > periods = 12 > principal = 1000 > future value = 0 > type = false > pmt(...) = -88.848788678342 > current nop(...) = 7 > expected nop(...) = 12 > > A repository-wide search found no current call site for nop(), so I am > treating this as a dormant library defect rather than claiming production > loan impact. > > I prepared a focused correction and regression tests in a public fork: > > https://github.com/kadyrbekovhamit-cyber/fineract/commit/6980e1377ce2e5a1eaf0586e628b27bb64dd8c26 > > The proposed inverse is: > A = emiAmount * (type ? 1 + rate : 1) > growth = (A - rate * futureValue) / (A + rate * principal) > N = log(growth) / log1p(rate) > > The corrected implementation passes 33/33 direct PMT/NOP round trips > across zero and non-zero rates, both payment timings, and a non-zero future > value. A JUnit test is included. The full Gradle target could not run > locally because this checkout requires JDK 25 while the available JDK is 26. > > The contribution guide requires a FINERACT JIRA key in the PR title and > commit. ASF JIRA does not allow guest issue creation, so could a maintainer > please advise whether this should receive a ticket, or create/link one if > the correction is wanted? I can then update the commit title and open the > conforming PR. > > Best regards, > Xamit Kadirbekov > GERO Research > > >
