On 2020-09-07 13:05, Joe Monk wrote:
"No it isn't.  4/3 yields 1.333333... to 15 digits,
and is of precision (15,14)"

Depends on RULES(IBM) or RULES(ANS). If its RULES(IBM) it will never be
integer division.

It doesn't depend on whether IBM rules or ANS rules are in force.

What I said it correct for IBM rules also.
The result is always an integer.
See Table 16.
When the operands have maximum precision, the result is integer.

The formulas for precision and scale factor are exactly the same.

If its RULES(ANS) and the operands are unscaled, then it
will be integer division.

On Sun, Sep 6, 2020 at 7:34 PM Robin Vowels <robi...@dodo.com.au> wrote:

On 2020-09-07 09:35, Joe Monk wrote:
> "PL/I doesn't have integers."
>
> Sorry Shmuel, youre incorrect.
>
> FIXED BINARY (15,0) is a 2 byte integer and FIXED BINARY (31,0) is a 4
> byte
> integer.
>
> "The ratiio 4/3 is FIXED BIN,"
>
> No, its FIXED DECIMAL (1,0)...

No it isn't.  4/3 yields 1.333333... to 15 digits,
and is of precision (15,14)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to