OpenCOBOL Forum Index OpenCOBOL
different (wrong) results on comp-3 depending on fnotrunc | Register To Post |
| Threaded | Newest First | Previous Topic | Next Topic | Bottom |
| Poster | Thread |
|---|---|
| SigMilWas | Posted on: 2012/6/28 16:46 |
Just popping in ![]() ![]() Joined: 2011/4/16 From: Germany Posts: 6 |
different (wrong) results on comp-3 depending on fnotrunc Hi guys,
I'am using OC 1.1 on suselinux. Have a look on this simple program named cobnum.cbl: Compile this programm with cobc cobnum.cbl. Run this program with cobcrun cobnum and you will see (all is okay): Now compile this programm with cobc -fnotrunc cobnum.cbl. Run this program with cobcrun cobnum and you will see (the first result is quite wrong) : Why does the fnotrunc-option weight the computation of com-3 fields?? This seems to be a serious bug. With kind regards Michael ![]() |
| btiffin | Posted on: 2012/6/29 3:22 |
Home away from home ![]() ![]() Joined: 2008/6/7 From: CANADA Posts: 1196 |
Re: different (wrong) results on comp-3 depending on fnotrunc Micheal.
I'm not going to pretend to be that guy, but Sergey has a good eye to find numeric inaccuracies and the skill to fix them. Watch the SourceForge SVN tree. Sergey has already posted some updates, libcob/numeric.c was one of the files patched so far. Not for this issue though. But do keep an eye of the forge at http://sourceforge.net/projects/open-cobol/ and http://open-cobol.svn.sourceforge.net/viewvc/open-cobol/ Cheers, Brian |
| human | Posted on: 2012/6/29 14:41 |
Home away from home ![]() ![]() Joined: 2007/5/15 From: GERMANY Posts: 1416 |
Re: different (wrong) results on comp-3 depending on fnotrunc Hi Brian,
can you please add these two samples to the test suite (it's better to have a failed test in trunk than a bug we forget to fix - or to add a similar bug later on). If it's possible I'd like you to add a test for every bugfix that is checked in. Pleeeeaaase. Simon 'human' Sobisch |
| ska | Posted on: 2012/7/12 12:22 |
Just can't stay away ![]() ![]() Joined: 2008/3/17 From: NYC Posts: 145 |
Re: different (wrong) results on comp-3 depending on fnotrunc numeric.c with corresponding fix commited to SVN.
|
| SigMilWas | Posted on: 2012/9/10 11:49 |
Just popping in ![]() ![]() Joined: 2011/4/16 From: Germany Posts: 6 |
Re: different (wrong) results on comp-3 depending on fnotrunc Hi Sergey,
we checked out the newest version today (09/10/2012), but the bug is still present. The module numeric.c was recently changed in september. Michael |
| ska | Posted on: 2012/9/12 20:47 |
Just can't stay away ![]() ![]() Joined: 2008/3/17 From: NYC Posts: 145 |
Re: different (wrong) results on comp-3 depending on fnotrunc Updated to the latest from SVN today - I don't see this error. Everything is correct.
And, BTW, I added one thing to your test. If you still have this bug, you will see funny result.
|
| Threaded | Newest First | Previous Topic | Next Topic | Top |
| Register To Post | |








