T.R | Title | User | Personal Name | Date | Lines |
---|
3217.1 | xref | KERNEL::BIRKINSHAW | Press Enter to Exit | Fri Mar 14 1997 12:24 | 6 |
| This is the same problem for the same custoemr as discussed in
note 581 of DEC_COBOL_IFT. And I see I forgot to mention that
the problem is confined to alpha in my base note.
regards
Simon
|
3217.2 | From CLT::DEC_COBOL_IFT 581 | PACKED::BRAFFITT | | Fri Mar 14 1997 13:33 | 96 |
| <<< CLT::DISK$CLT_LIBRARY3:[NOTES$LIBRARY]DEC_COBOL_IFT.NOTE;1 >>>
-< DEC COBOL notes [kits/docs - 2, performance - 7] >-
================================================================================
Note 581.0 ROUNDED clause gives incorrect results on Alpha 1 reply
KZIN::HUDSON "That's what I think" 90 lines 14-MAR-1997 10:43
--------------------------------------------------------------------------------
There is a difference in behaviour between VAX and Alpha for the following
program, and I believe ALpha is incorrect.
The customer reported this problem with 2.3 of the compiler, but trying on 2.4
makes no difference.
Previous errors that the customer saw with ROUNDED were fixed with 2.3, but
this program still sees problems:
Thanks for any comments
nick
================================================================================
identification division.
program-id. cobol_bug_test.
data division.
working-storage section.
01 work_no comp-2 value 0.00.
01 disp_1 pic ------9.99.
procedure division.
main section.
p1.
display " ".
display "Cobol v2.3 'subtract' test. v2 - a selection of simple tests".
display " ".
display " ".
display " ".
move 1.00 to work_no.
subtract 0.00 from work_no rounded
move work_no to disp_1.
display "subtract 0.00 from 1.00 rounded gives " disp_1.
move 10.00 to work_no.
subtract 0.00 from work_no rounded
move work_no to disp_1.
display "subtract 0.00 from 10.00 rounded gives " disp_1.
move -10.00 to work_no.
subtract 0.00 from work_no rounded
move work_no to disp_1.
display "subtract 0.00 from -10.00 rounded gives " disp_1.
move 1.00 to work_no.
subtract 5.00 from work_no rounded
move work_no to disp_1.
display "subtract 5.00 from 1.00 rounded gives " disp_1.
move 10.00 to work_no.
subtract -5.00 from work_no rounded
move work_no to disp_1.
display "subtract 5.00 from 10.00 rounded gives " disp_1.
move -10.00 to work_no.
subtract 30.00 from work_no rounded
move work_no to disp_1.
display "subtract 30.00 from -10.00 rounded gives " disp_1.
================================================================================
Alpha:
Cobol v2.3 'subtract' test. v2 - a selection of simple tests
subtract 0.00 from 1.00 rounded gives 1.50
subtract 0.00 from 10.00 rounded gives 10.50
subtract 0.00 from -10.00 rounded gives -10.50
subtract 5.00 from 1.00 rounded gives -4.50
subtract 5.00 from 10.00 rounded gives 15.50
subtract 30.00 from -10.00 rounded gives -40.50
VAX:
Cobol v2.3 'subtract' test. v2 - a selection of simple tests
subtract 0.00 from 1.00 rounded gives 1.00
subtract 0.00 from 10.00 rounded gives 10.00
subtract 0.00 from -10.00 rounded gives -10.00
subtract 5.00 from 1.00 rounded gives -4.00
subtract 5.00 from 10.00 rounded gives 15.00
subtract 30.00 from -10.00 rounded gives -40.00
|
3217.3 | see note 3212 | PACKED::BRAFFITT | | Fri Mar 14 1997 13:45 | 4 |
| Both programs use COMP-2. COMP-2 results are not identical between
VAX and Alpha.
Some details are in note 3212.
|
3217.4 | Bug - workaround | DJS::SZYMANSKI | | Fri Mar 14 1997 15:07 | 6 |
| Looks like a bug to me. Rewriting the SUBTRACT as the equivalent COMPUTE
statement produces the expected result, i.e. where
subtract 0 from f1 rounded
gets the result 1.5,
compute f1 rounded = f1 - 0.0
gets the result 1.0.
|
3217.5 | | KERNEL::BIRKINSHAW | Press Enter to Exit | Mon Mar 17 1997 05:17 | 5 |
| I agree it's a bug, but unfortunately the workaround wouldn't be
acceptable. The customer has several hundred thousand lines of
code which would need to be hand-checked and changed. They are
tearing their hair out over this one and we need a quick fix.
Looks like IPMT time.
|
3217.6 | | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Mon Mar 17 1997 11:09 | 3 |
| Don, this is not a case of "COMP-2 results don't always match."
This is a bug. Floating-point operations with ROUNDED seem to be adding
an extra 0.5 (with appropriate sign), which they should not be doing.
|
3217.7 | when's the fix ? | KERNEL::SMITH | | Tue Mar 18 1997 06:02 | 7 |
|
Do you have an inkling as to when a workaround might be available ?
Thanks and regards
ewan smith - UK CSC.
|
3217.8 | COMPUTE is the only temporary workaround identified so far | PACKED::BRAFFITT | | Tue Mar 18 1997 07:30 | 17 |
| > Do you have an inkling as to when a workaround might be available ?
This is the only temporary workaround that has been identified so far.
<<< CLT::DISK$CLT_LIBRARY3:[NOTES$LIBRARY]COBOL.NOTE;1 >>>
-< VAX/DEC COBOL >-
================================================================================
Note 3217.4 Rounding problem with IEEE floats 4 of 7
DJS::SZYMANSKI 6 lines 14-MAR-1997 15:07
-< Bug - workaround >-
--------------------------------------------------------------------------------
Looks like a bug to me. Rewriting the SUBTRACT as the equivalent COMPUTE
statement produces the expected result, i.e. where
subtract 0 from f1 rounded
gets the result 1.5,
compute f1 rounded = f1 - 0.0
gets the result 1.0.
|
3217.9 | We are testing a potential fix | PACKED::BRAFFITT | | Wed Mar 19 1997 15:39 | 48 |
| From: PACKED::BRAFFITT "19-Mar-1997 1404" 19-MAR-1997 14:05:27.18
To: FIXCLD::SDT_ACE
CC: BRAFFITT
Subj: UPDATE UVO105254
RE: CLD UVO105254
CLT::COBOL note 3217
DEC COBOL - ADD/SUBTRACT/MULTIPLY/DIVIDE ROUNDED with COMP-1 and COMP-2
>UVO105254 RC UN 2 BLOTCKY DEC COBOL T 0 17-MAR-1997
>On Alpha DEC Cobol 2.4 IEEE format floats are incorrectly rounded
>Alias: CFS.49745
>Customer company: BYTEL
>NORTHGATE HSE 1A STOKE ROAD SLOUGH
We are testing a potential fix for this problem. If our one week of regression
testing goes well, we should have a compiler image for OpenVMS Alpha for you to
copy for the customer to try next THU morning (26-March).
We are considering a DEC COBOL V2.4 TIMA kit for OpenVMS Alpha for late April
or early May, and this compiler fix would be included in that TIMA kit.
The reported problem is present in all currently supported versions of DEC
COBOL (i.e. V2.3 and V2.4).
The problem does not impact COMPUTE, so the temporary workaround with DEC COBOL
V2.3 SSB and V2.4 SSB compilers is to
replace
ADD/SUBTRACT/MULTIPLY/DIVIDE ROUNDED destination COMP-1 or COMP-2
with an equivalent
COMPUTE ROUNDED destination COMP-1 or COMP-2
Even with this compiler fix, COMP-2 (which defaults to D float with VAX COBOL
and DEC COBOL) is not 100% compatible between VAX and Alpha. This is
documented in the Alpha Architecture Manual and in the DEC COBOL User Manual
Compatibility Appendix (section B.3.7 p. B-17).
Release note:
2.4-906 A compiler problem has been corrected where ADD, SUBTRACT,
MULTIPLY, and DIVIDE with a floating-point destination
(COMP-1 or COMP-2) and the ROUNDED option could result in
a wrong answer.
- Don Braffitt
DEC/VAX COBOL project leader
|
3217.9 | We are testing a potential fix | PACKED::BRAFFITT | | Thu Mar 20 1997 09:22 | 64 |
| From: SPSEG::SDT_ACE "20-Mar-1997 0916 -0500" 20-MAR-1997 09:20:10.46
To: ,cc: Distribution list
CC:
Subj: An update on Case UVO105254 (On Alpha DEC Cobol 2.4 IEEE format floats are incorrectly rounded)
[This update was sent from BRAFFITT on 20-MAR-1997 09:16:49.12]
[SDT Support responsible for next action, Problem is undefined]
----------------
The following error message was returned whilst sending to
address FIXCLD::SDT_ACE
%NMAIL-E-LOGLINK, error creating network link to node FIXCLD
-SYSTEM-F-INVLOGIN, login information invalid at remote node
This is a soft error, but the message has been cancelled.
No more attempts to send to this address will be made.
----------------
The text of your failed mail message follows:
RE: CLD UVO105254
CLT::COBOL note 3217
DEC COBOL - ADD/SUBTRACT/MULTIPLY/DIVIDE ROUNDED with COMP-1 and COMP-2
>UVO105254 RC UN 2 BLOTCKY DEC COBOL T 0 17-MAR-1997
>On Alpha DEC Cobol 2.4 IEEE format floats are incorrectly rounded
>Alias: CFS.49745
>Customer company: BYTEL
>NORTHGATE HSE 1A STOKE ROAD SLOUGH
We are testing a potential fix for this problem. If our one week of regression
testing goes well, we should have a compiler image for OpenVMS Alpha for you to
copy for the customer to try next WED morning (26-March).
We are considering a DEC COBOL V2.4 TIMA kit for OpenVMS Alpha for late April
or early May, and this compiler fix would be included in that TIMA kit.
The reported problem is present in all currently supported versions of DEC
COBOL (i.e. V2.3 and V2.4).
The problem does not impact COMPUTE, so the temporary workaround with DEC COBOL
V2.3 SSB and V2.4 SSB compilers is to
replace
ADD/SUBTRACT/MULTIPLY/DIVIDE ROUNDED destination COMP-1 or COMP-2
with an equivalent
COMPUTE ROUNDED destination COMP-1 or COMP-2
Even with this compiler fix, COMP-2 (which defaults to D float with VAX COBOL
and DEC COBOL) is not 100% compatible between VAX and Alpha. This is
documented in the Alpha Architecture Manual and in the DEC COBOL User Manual
Compatibility Appendix (section B.3.7 p. B-17).
Release note:
2.4-906 A compiler problem has been corrected where ADD, SUBTRACT,
MULTIPLY, and DIVIDE with a floating-point destination
(COMP-1 or COMP-2) and the ROUNDED option could result in
a wrong answer.
- Don Braffitt
DEC/VAX COBOL project leader
|
3217.10 | Update sent on case - fixed with 2.4-906 compiler | PACKED::BRAFFITT | | Mon Mar 24 1997 07:10 | 73 |
| From: SPSEG::SDT_ACE "24-Mar-1997 0651 -0500" 24-MAR-1997 06:53:45.51
To: ,cc: Distribution list
CC:
Subj: An update on Case UVO105254 (On Alpha DEC Cobol 2.4 IEEE format floats are incorrectly rounded)
[This update was sent from BRAFFITT on 24-MAR-1997 06:51:05.45]
[SDT Support responsible for next action, Problem is undefined]
CLOSE UVO105254/CODE=FN/FIXREL=2.5/DESIGN=YES/COMPLEX=YES/AVAILABLE=YES
/TIMING=C/VALID=C
RE: CLD UVO105254
CLT::COBOL note 3217
DEC COBOL - ADD/SUBTRACT/MULTIPLY/DIVIDE ROUNDED with COMP-1 and COMP-2
>UVO105254 RC UN 2 BLOTCKY DEC COBOL T 0 17-MAR-1997
>On Alpha DEC Cobol 2.4 IEEE format floats are incorrectly rounded
>Alias: CFS.49745
>Customer company: BYTEL
>NORTHGATE HSE 1A STOKE ROAD SLOUGH
We have a compiler fix for this problem. We plan to make the fix available
with DEC COBOL V2.5. In addition, we have a built an updated DEC COBOL 2.4
compiler for OpenVMS Alpha with the fix that we would like you to give to the
customer to evaluate:
******************************
Directory CLT::CLT$LIBRARY:[DEC_COBOL]
COBOL.EXE;906 10449 19-MAR-1997 12:05:29.00
This updated compiler is available for all versions of OpenVMS Alpha currently
supported by DEC COBOL V2.4 and can be given to any customer with a valid DEC
COBOL service contract for those versions of OpenVMS Alpha:
******************************
CLT::CLT$LIBRARY:[DEC_COBOL]DEC_COBOL_SPD_VMS_V24.TXT;1
SOFTWARE REQUIREMENTS
OpenVMS Alpha Operating System Version 6.1-Version 7.0 (SPD 25.01.xx)
We are considering a DEC COBOL TIMA kit for OpenVMS Alpha for late April or
early May, and this compiler fix would be included in that TIMA kit.
The problem does not impact COMPUTE. There are three known temporary
workarounds with DEC COBOL compilers prior to 2.4-906 for customers who choose
not to use this updated compiler:
Remove ROUNDED option where redundant
Rewrite format 1 ADD,SUBTRACT,MULTIPLY,DIVIDE as format 2
Rewrite format 1 ADD,SUBTRACT,MULTIPLY,DIVIDE as COMPUTE:
replace
ADD,SUBTRACT,MULTIPLY,DIVIDE ROUNDED destination COMP-1 or COMP-2
with an equivalent
COMPUTE ROUNDED destination COMP-1 or COMP-2
Even with this compiler fix, COMP-2 (which defaults to D float with VAX COBOL
and DEC COBOL) is not 100% compatible between VAX and Alpha. This is
documented in the Alpha Architecture Manual and in the DEC COBOL User Manual
Compatibility Appendix (section B.3.7 p. B-17).
Release note:
2.4-906 A compiler problem has been corrected where ADD, SUBTRACT,
MULTIPLY, and DIVIDE with a floating-point destination
(COMP-1 or COMP-2) and the ROUNDED option could result in
a wrong answer.
Thank for you the very concise example which we were able to use to reproduce
this problem on our systems.
- Don Braffitt
DEC/VAX COBOL project leader
|
3217.11 | See CLT::DEC_COBOL_IFT note 2.58 for a kit with the fix | PACKED::BRAFFITT | | Tue Apr 22 1997 08:12 | 0
|