[Kmymoney-devel] [Android Port] Help with computing the account balance

Allan agander93 at gmail.com
Tue Oct 9 23:13:07 UTC 2012


On 09/10/12 23:49, Eric Bonney wrote:
> Thanks Allan,
>
> I can easily just leave it at say -123.32/100 and it will work too but
> was hoping to work more like KMM and I can't figure out how you jumped
> from the 12352/100 to 6266/50 then down to 3133/25.
>
> Did you just get the GCD and then divide by that?
>
> Eric
>

Just simplifying, here by dividing numerator and denominator by two 
until no common factor.

Allan

>
>
>     I'm not an expert, but in case Thomas is tied up, this seems to be a
>     possibility.
>
>     Multiply by 100 to eliminate the decimal fraction (Can't remember,
>     if I ever knew, the proper maths terminology).
>
>     125.32 = 125.32 * 100/100 = 12532/100 = 6266/50 = 3133/25
>
>     14521.42 = 14521.42 * 100/100 = 1452142/100 = 726071/50
>
>     If that makes it more confusing, apologies.
>
>     Allan
>     _________________________________________________
>     KMyMoney-devel mailing list
>     KMyMoney-devel at kde.org <mailto:KMyMoney-devel at kde.org>
>     https://mail.kde.org/mailman/__listinfo/kmymoney-devel
>     <https://mail.kde.org/mailman/listinfo/kmymoney-devel>
>


More information about the KMyMoney-devel mailing list