On 2020-09-10 00:32, Seymour J Metz wrote:
The results that you have described are not integer arithmetic. In integer arithmetic, 4/3 is 1.
Look at the second result following the program. You will see that A/B == 4/3 yields 1.
________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Robin Vowels <[email protected]> Sent: Wednesday, September 9, 2020 10:14 AM
----- Original Message ----- From: "Seymour J Metz" <[email protected]> Sent: Monday, September 07, 2020 3:02 PM Subject: Re: Constant Identifiers 4/3 yields 1.3, 04/3 yields 1332, ... Rubbish. 4/3 yields 1.33333333333333 INTEGER_DIVISION: PROCEDURE OPTIONS (MAIN); DECLARE (A, B) FIXED DECIMAL (15); A = 4; B = 3; PUT (4/3); PUT (A/B); PUT ( (A/B) * 6 ); END INTEGER_DIVISION; /* RESULTS: 1.33333333333333 1 6 */ However, DIVIDE(4,3,16,15) yields 1.3...2 to 15 digits No, it yields 1.33333333333333
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
