Rounding error after stock split

Janis tuxnet at posteo.de
Fri Dec 8 16:01:59 GMT 2023


Hi Thomas,

nice, thank you so much!
I've initially encountered this on 5.1.3 but wanted to double check with the 
current master before asking. With the complete rewrite you're speaking of - 
is there any chance to get a fix "backported" to 5.1.3 (for Debian in my case)?

Cheers
Janis

On Freitag, 8. Dezember 2023 13:12:48 CET Thomas Baumgart wrote:
> Janis,
> 
> On Dienstag, 5. Dezember 2023 18:05:50 CET Janis via KMyMoney wrote:
> > Hi all,
> > 
> > I have an issue with an 1/2 stock split where the resulting
> > balance/quantity seems to be rounded to two digits rather then the
> > precision defined for the security. Searching a bit I found
> > https://bugs.kde.org/show_bug.cgi?id=445472 with looked related in first
> > place but might as well not be.
> 
> Thanks for reporting. In fact, it seems related but it is not since the code
> base between those two versions (5.1.2 and the one you use) has been
> completely rewritten.
> 
> > I took the demo file from said bug to reproduce the issue with the
> > AppImage
> > build from 72421dc1f9065fa31636f71b2ec86e0ae6552d3f (please find it
> > attached). In the MethProfits ledger you can see a 1/2 split of 15.12340
> > shares (configured with fractions 1/100000) resulting in 30.2500 shares.
> > 
> > Might as well be that I'm missing something obvious as I never did that
> > before - would be very happy to learn about that as well. :)
> 
> No, you don't miss anything. You just get bitten by a bug and I stepped on
> it :) In the end, the fix was easy:
> 
>  
> https://invent.kde.org/office/kmymoney/-/commit/0ff957d658ae7ee81223c36d385
> 0cbbae60394ca




More information about the KMyMoney mailing list