Gnucash.sfs - WARNING - applies to gnucash v1.8.10

Please post any bugs you have found
Post Reply
Message
Author
GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

Gnucash.sfs - WARNING - applies to gnucash v1.8.10

#1 Post by GeoffS »

The currently available gnucash.sfs (v1.8.10) has a major bug.
DO NOT use for a mission critical application. It will probably eventually crash with a floating point error.
Do a search for 'gnucash' & 'floating point error'. Many references will be found.
Hopefully we will one day have gnucash V2 which doesn't use floating point arithmetic.
Oh yes - I found this bug the hard way :(
Geoff

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

I'm astounded, the developers have used floating point arithmetic for money calculations!!!!!! They must have thought the error would be small enough to ignore, but it's still dumb -- to my way of thinking, financial calculations should be done with fixed-point arithmetic, and I think (at least I vaguelly recall) the maths-coprocessor part of the CPU handles 80-bit integers which should be big enough.

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#3 Post by GeoffS »

Barry
I totally agree. It wasn't until I went looking for this bug that I learnt about their use of floating point. I certainly never noticed any errors from that, then the amounts I work with are not that big. It would be in big numbers that the problems would show up.
Reminds me of bookkeeping programs that I encountered in early years written in Fortran !!!!!! In one case by somebody who actually did have a passing familiarity with Cobol, he was just was more familiar with Fortran and I suspect was not a very good typist :lol:
Yes, I think 80 bits should be enough, even with inflation. I seem to remember 48 bit arithmetic was deemed big enough for a small insurance company - yes 48 bits, 64 bits used more memory!!
Cheers
Geoff

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#4 Post by lstandish »

According to GnuCash Developer Robert Merkel in an interview on Jul 05, 2001 (!), Gnucash since version 1.6 does not use floating point numbers. From an interview (http://slashdot.org/interviews/01/07/05/1456248.shtml):
GnuCash 1.6 stores all quantities and performs all calculations using an exact (integer-based) numeric representation. Our code was the result of extended, er, "discussions" on issues of currency representation and rounding, and consequently it provides pretty comprehensive facilities for determining and specifying the appropriate precision, and exactly how results should be rounded (or not) to that precision, if required.
This would mean the issues reported in this thread about Gnucash v1.8.10 were evidently not due to floating point math.

I have used Gnucash for the past 3 years with not troubles at all. I think it is an excellent dual-entry accounting program, appropriate for both individuals and small businesses and very suitable for Puppy. I plan to make a pet with the latest version.

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#5 Post by GeoffS »

Istandish
Wow! a blast from the past.
Despite what you have quoted, I can only say my gnucash died with a 'floating point error' and it was V1.8.10
As I mentioned in my first post there were plenty of mentions in various forums.
I certainly liked the program just had this nasty little bug. It is still the only free bookkeeping program that I've used that I do like and I've tried many.
I had to go back to QuickBooks under Wine.
What version of Gnucash are you using and thinking of producing a .pet for? I'll be interested.
Cheers
Geoff

User avatar
lstandish
Posts: 126
Joined: Fri 06 Jun 2008, 13:22

#6 Post by lstandish »

Hi Geoff,

Perhaps your floating point error on V1.8.10 was caused by some floating point calculation other than handling the transactions. I searched the web for "gnucash floating point error" and found only a very few results, all of them several years old. Since Gnucash is widely used, much more so now than the the days of your trouble, I believe there would have to be recent comments on it on the Web if it were still an issue. And even if the program were still using floating point numbers, I don't think that is a reason for it to crash, only a reason to accumulate roundoff errors.

I have used gnucash on Debian Linux (currently Etch) for nearly 3 years to record thousands of transactions for dozens of accounts, including multi-currency transactions (which I think Quickbooks won't do), and it has NEVER crashed a single time. It has become a program I "can't live without," so I am pretty much obligated to get it working under Puppy, or else not migrate to Puppy.

I now use gnucash v2.0.5 on my Debian box, which is still my main machine (I am new to Puppy). For compiling on Puppy I downloaded the latest stable version (2.2.5). I'll post here to this forum when I have a working PET. I will be using it with a remastered Puppy 4.00.

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#7 Post by GeoffS »

istandish
My original research led me to the facts that V2 was a complete re-write and it was mainly to remove the use of floating point and that V1 development had stopped for quite some time due to the problems with floating point.
I was left with no doubt that V1.8.10 used FP for the transactions, I looked at dumps of the transactions.
If you get V2 running on Puppy I'll be very interested although at present I have to use QB as my 'retirement' has been interrupted by the return of a client who needs all the Australian GST calculations and form design. If I'm using QB for a client I may as well use it for myself.
Keep posting
Cheers
Geoff

Post Reply