![]() Registered Member ![]()
|
I'm new to KDE, and just took a look at KmyMoney, and I am impressed, and will be recommending it to quicken users, as I am a pushy Linux advocate.
I've been programming business applications for 30 years, COBOL, FORTRAN, and of course in the last 10 years lots of Microsoft Technologies, including some Java and C/C++.... Not trying to build a resume here, just saying, cuz I am about to ask a fairly stupid question about KDE financial methods. What is purpose (for example) of storing a transaction amount of say '41.46' into the database as '2073/50' ? A very clever algorithm, love it, and I do realize that 2073/50 = 41.46 , but why not just store the '41.46' and be done with it? Why the fraction, a requirement of "alkimia D-BUS", (AlkValue), very curious? -- Thanks in advance, Michaela. |
![]() KDE Developer ![]()
|
To maintain precision when performing calculations (the first of The ultimate objectives of KMyMoney). Think of this amount 1/3 which equals 0.(3). Now you can store 0.3333 (etc) but you will loose precision when a lot of these amounts are passed trough arithmetic operations.
while
cristian.onet, proud to be a member of KDE forums since 2008-Oct.
|
![]() KDE Developer ![]()
|
By the way we use http://gmplib.org/ to obtain the arbitrary precision arithmetic.
cristian.onet, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Just to be precise, AlkValue is part of libAlkimia, not Alkimia DBus, which was part of the whole Alkimia "initiative" but is unmaintained at the moment and not required for KMyMoney at all.
Hei Ku, proud to be a member of the KMyMoney Development Team since January-2008
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft