IBM has changed its specification on what raises the FIXEDOVERFLOW condition. Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
IBM has changed its specification on what raises the FIXEDOVERFLOW condition. Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
Robin Vowels <robin....@gmail.com> wrote:.
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
That is really stupid, especially since overflow detection is a hardware feature on almost all machines, so the effort to detect it is minimal.
Robin Vowels <robin....@gmail.com> wrote:.
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
That is really stupid, especially since overflow detection is a hardware feature on almost all machines, so the effort to detect it is minimal.
Anyway, FIXEDOVERFLOW is cheap to implement and quick to
execute.
.
You cannot with confidence engage in integer arithmetic.
On Tuesday, October 4, 2022 at 5:23:13 AM UTC+11, bearlyabus...@gmail.com wrote:
Robin Vowels <robin....@gmail.com> wrote:.
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.That is really stupid, especially since overflow detection is a hardware
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. >>> (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
feature on almost all machines, so the effort to detect it is minimal.
Indeed. Isn't there an Intel instruction to interrupt on overflow?
.
Anyway, FIXEDOVERFLOW is cheap to implement and quick to
execute.
.
You cannot with confidence engage in integer arithmetic.
Robin Vowels <robin.vowels@gmail.com> wrote:
On Tuesday, October 4, 2022 at 5:23:13 AM UTC+11, bearlyabus...@gmail.com wrote:
Robin Vowels <robin....@gmail.com> wrote:.
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.That is really stupid, especially since overflow detection is a hardware >>> feature on almost all machines, so the effort to detect it is minimal.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
Indeed. Isn't there an Intel instruction to interrupt on overflow?
INTO. I think it’s a one-byte instruction.
.
Anyway, FIXEDOVERFLOW is cheap to implement and quick to
execute.
.
You cannot with confidence engage in integer arithmetic.
On 10/4/22 9:50 AM, Peter Flass wrote:.
Robin Vowels <robin....@gmail.com> wrote:
On Tuesday, October 4, 2022 at 5:23:13 AM UTC+11, bearlyabus...@gmail.com wrote:
Robin Vowels <robin....@gmail.com> wrote:Indeed. Isn't there an Intel instruction to interrupt on overflow?
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.That is really stupid, especially since overflow detection is a hardware >>> feature on almost all machines, so the effort to detect it is minimal. >> .
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>> for FIXED BINARY nor disable it.
INTO. I think it’s a one-byte instruction.
.
Anyway, FIXEDOVERFLOW is cheap to implement and quick to
execute.
.
You cannot with confidence engage in integer arithmetic.
I agree that it’s puzzling, but this, too, dates back to 2005 at the latest..
On Wednesday, October 5, 2022 at 3:42:05 AM UTC+11, John W. Kennedy wrote:
On 10/4/22 9:50 AM, Peter Flass wrote:.
Robin Vowels <robin....@gmail.com> wrote:
On Tuesday, October 4, 2022 at 5:23:13 AM UTC+11, bearlyabus...@gmail.com wrote:
Robin Vowels <robin....@gmail.com> wrote:Indeed. Isn't there an Intel instruction to interrupt on overflow?
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.That is really stupid, especially since overflow detection is a hardware >>>>> feature on almost all machines, so the effort to detect it is minimal. >>>> .
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>>>> for FIXED BINARY nor disable it.
INTO. I think it’s a one-byte instruction.
.
Anyway, FIXEDOVERFLOW is cheap to implement and quick to
execute.
.
You cannot with confidence engage in integer arithmetic.
I agree that it’s puzzling, but this, too, dates back to 2005 at the latest..
It is worth reiterating that the failure of the Ariadne 5 space mission failed because of integer overflow.
.
A conversion from a 64-bit floating-point value to a 16-bit integer overflowed, but was not intercepted by the recovery mechanism
which was not enabled. (The code was written in Ada.)
On 10/7/22 12:50 AM, Robin Vowels wrote:.
On Wednesday, October 5, 2022 at 3:42:05 AM UTC+11, John W. Kennedy wrote:
I agree that it’s puzzling, but this, too, dates back to 2005 at the latest..
It is worth reiterating that the failure of the Ariadne 5 space mission failed because of integer overflow.
.
A conversion from a 64-bit floating-point value to a 16-bit integer overflowed, but was not intercepted by the recovery mechanism
which was not enabled. (The code was written in Ada.)
Which /does/ check for fixed-point overflow..
In fact, it was a botched handling of the exception
that caused the ultimate failure. Bleaugghhh!
IBM has changed its specification on what raises the FIXEDOVERFLOW condition. Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote:
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. >> (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I tried to get it put back the old way, but was ignored. C needs it to be ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer variable a value that is larger than the maximum value the variable can hold. The C standard defines this situation as undefined behaviour (meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote:
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic. >>> (See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I
tried to get it put back the old way, but was ignored. C needs it to be
ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer
variable a value that is larger than the maximum value the variable can
hold. The C standard defines this situation as undefined behaviour
(meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
John W Kennedy <john.w.kennedy@gmail.com> wrote:
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote:
IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it
for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I
tried to get it put back the old way, but was ignored. C needs it to be >>> ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer
variable a value that is larger than the maximum value the variable can
hold. The C standard defines this situation as undefined behaviour
(meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
That sounds like SIZE.
Yes, but that’s too late to detect a prior overflow in the register
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and SIZE in the first place, and why there’s a warning that a SIZE may be reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360 family, which does arithmetic storage-to-storage.
On 10/8/22 6:00 PM, Peter Flass wrote:.
John W Kennedy <john.w....@gmail.com> wrote:
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote: >>>> IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>> for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I
tried to get it put back the old way, but was ignored. C needs it to be >>> ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer >>> variable a value that is larger than the maximum value the variable can >>> hold. The C standard defines this situation as undefined behaviour
(meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
That sounds like SIZE.
Yes, but that’s too late to detect a prior overflow in the register.
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and SIZE in the first place, and why there’s a warning that a SIZE may be reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360 family, which does arithmetic storage-to-storage..
On Saturday, October 8, 2022 at 10:48:58 PM UTC-4, John W. Kennedy wrote:
Yes, but that’s too late to detect a prior overflow in the register
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and >> SIZE in the first place, and why there’s a warning that a SIZE may be
reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360
family, which does arithmetic storage-to-storage.
The Subset G (1987) standard says:
Let b be the numerical-base of rt, m be the <number-of-digits> of rt, n
be the <scale-factor> of rt (if rt has <fixed>), and N be the maximum <number-of-digits> allowed for the <base> and <scale> of rt.
Case 1. rt has <fixed>.
Determine a <real-value> v' as follows:
v’ = (b**-n)*floor(v*b**n), if v > 0,
v’ =(b**-n)*ceil(v*b**n), if v < 0.
Case 1.1. This operation was invoked by ADD-BIF, DIVIDE-BIF, MULTIPLY-BIF, or SUBTRACT-BIF.
Case 1.1.1. |v'| >= b**(m-n) and I v’ I <= b**(N-n).
Perform RAISE-CONDITION( <size-condition>).
Case 1.1.2. |v'| > b**(N-n).
Optionally perform RAISE-CONDITION( <fixedoverflow-condition>) ; otherwise, perform
~sE-C0NDrTr0N(<size-comiition>).
Case 1.1.3. (Otherwise).
Return v’.
John Cowan <cowan@ccil.org> wrote:
On Saturday, October 8, 2022 at 10:48:58 PM UTC-4, John W. Kennedy wrote:
Yes, but that’s too late to detect a prior overflow in the register
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and >>> SIZE in the first place, and why there’s a warning that a SIZE may be
reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360
family, which does arithmetic storage-to-storage.
The Subset G (1987) standard says:
Let b be the numerical-base of rt, m be the <number-of-digits> of rt, n
be the <scale-factor> of rt (if rt has <fixed>), and N be the maximum
<number-of-digits> allowed for the <base> and <scale> of rt.
Case 1. rt has <fixed>.
Determine a <real-value> v' as follows:
v’ = (b**-n)*floor(v*b**n), if v > 0,
v’ =(b**-n)*ceil(v*b**n), if v < 0.
Case 1.1. This operation was invoked by ADD-BIF, DIVIDE-BIF, MULTIPLY-BIF, or SUBTRACT-BIF.
Case 1.1.1. |v'| >= b**(m-n) and I v’ I <= b**(N-n).
Perform RAISE-CONDITION( <size-condition>).
Case 1.1.2. |v'| > b**(N-n).
Optionally perform RAISE-CONDITION( <fixedoverflow-condition>) ; otherwise, perform
~sE-C0NDrTr0N(<size-comiition>).
Case 1.1.3. (Otherwise).
Return v’.
“Optionally” there is the killer, since SIZE is not enabled by default, and
requires a lot more code to detect than simple arithmetic overflow.
On Sunday, October 9, 2022 at 1:48:58 PM UTC+11, John W. Kennedy wrote:
On 10/8/22 6:00 PM, Peter Flass wrote:.
John W Kennedy <john.w....@gmail.com> wrote:
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote: >>>>>> IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both
FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>>>> for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I
tried to get it put back the old way, but was ignored. C needs it to be >>>>> ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer >>>>> variable a value that is larger than the maximum value the variable can >>>>> hold. The C standard defines this situation as undefined behaviour
(meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
That sounds like SIZE.
Yes, but that’s too late to detect a prior overflow in the register.
A register can't produce a SIZE interrupt.
The SIZE condition can only be raised when a FIXED DECIMAL result is stored.
This can occur when an intermediate DECIMAL result is stored, as well as
when a decimal result is finally assigned to a DECIMAL variable.
If the declaration of a DECIMAL variable is for an odd number of digits,
the SIZE condition is raised directly. If an even number of digits is declared,
additional software is required to check the most-significant nibble.
.
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and >> SIZE in the first place, and why there’s a warning that a SIZE may be.
reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360
family, which does arithmetic storage-to-storage.
Yes, there can be some exceptions.
“Optionally” there is the killer, since SIZE is not enabled by default, andAnd the silly thing doesn’t explain what “optionally” means in the first
requires a lot more code to detect than simple arithmetic overflow.
place. This is aupposed to be a formal definition? Feh!
On Sunday, October 9, 2022 at 5:31:47 PM UTC-4, John W. Kennedy wrote:.
A specification is a contract between implementers and users,“Optionally” there is the killer, since SIZE is not enabled by default, andAnd the silly thing doesn’t explain what “optionally” means in the first
requires a lot more code to detect than simple arithmetic overflow.
place. This is aupposed to be a formal definition? Feh!
and it's quite typical for a spec to provide a certain amount of
implementer flexibility. For example, the C standard requires that
an `int` variable allow values between -32768 and +32767 inclusive,
but does not exclude that it is a 32-bit value. (The latest C standard requires 2's complement behavior, but previous ones did not.)
An example from the PL/I standard is that the components
of an expression (not involving &: or |:) may be evaluated in any order;
another is that STATIC variables may be initialized in any order; a third
is whether a return from a RECORD condition is followed by closing the file least I think that's what the EXIT-FROM-IO abstract operation does).
The formality with which the spec is expressed is neither here nor there.
On 10/9/22 7:02 AM, Robin Vowels wrote:.
On Sunday, October 9, 2022 at 1:48:58 PM UTC+11, John W. Kennedy wrote:
On 10/8/22 6:00 PM, Peter Flass wrote:.
John W Kennedy <john.w....@gmail.com> wrote:
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote: >>>>>> IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both >>>>>> FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>>>> for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I >>>>> tried to get it put back the old way, but was ignored. C needs it to be
ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer >>>>> variable a value that is larger than the maximum value the variable can
hold. The C standard defines this situation as undefined behaviour >>>>> (meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
That sounds like SIZE.
Yes, but that’s too late to detect a prior overflow in the register.
A register can't produce a SIZE interrupt.
.The SIZE condition can only be raised when a FIXED DECIMAL result is stored.
You are utterly contradicting the Language Reference for (F) and for Optimizer/Checker, which says very plainly that SIZE applies to FIXED BINARY..
This can occur when an intermediate DECIMAL result is stored, as well as when a decimal result is finally assigned to a DECIMAL variable.
If the declaration of a DECIMAL variable is for an odd number of digits, the SIZE condition is raised directly. If an even number of digits is declared,
additional software is required to check the most-significant nibble.
.
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and.
SIZE in the first place, and why there’s a warning that a SIZE may be >> reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360 >> family, which does arithmetic storage-to-storage.
Yes, there can be some exceptions.
An example from the PL/I standard is that the componentsThat's not correct. The evaluation of an expression proceeds according
of an expression (not involving &: or |:) may be evaluated in any order;
to the priority of operators and on parentheses.
3. An implementation may evaluate an <expression> (without an <and-logical> or <or-logical>),
<value-reference>, <variable-reference>, or <target-reference> by evaluating its contained
<expression>s, <value-reference>s, and <variable-reference>s in any order.
On Monday, October 10, 2022 at 8:33:33 AM UTC+11, John W. Kennedy wrote:
On 10/9/22 7:02 AM, Robin Vowels wrote:.
On Sunday, October 9, 2022 at 1:48:58 PM UTC+11, John W. Kennedy wrote: >>>> On 10/8/22 6:00 PM, Peter Flass wrote:
.John W Kennedy <john.w....@gmail.com> wrote:
On 10/8/22 8:36 AM, Clement Clarke wrote:
On Monday, October 3, 2022 at 10:28:54 PM UTC+11, Robin Vowels wrote: >>>>>>>> IBM has changed its specification on what raises the FIXEDOVERFLOW condition.
Back in the good old days, FIXEDOVERFLOW applied equally to both >>>>>>>> FIXED BINARY and FIXED DECIMAL arithmetic.
(see, for example. the 1974 LRM).
From at least 2018, FIXEDOVERFLOW applies only to FIXED DECIMAL arithmetic.
(See, for example, the 2018 LRM).
Overflow of FIXED BINARY operations is ignored. You cannot enable it >>>>>>>> for FIXED BINARY nor disable it.
I worked for the Fault Analyser group at IBM in the Perth Lab some 20 years ago.
I couldn't get a Fixed Overflow to get trapped by Fault Analyser. I >>>>>>> tried to get it put back the old way, but was ignored. C needs it to be >>>>>>> ignored, I think. Terrible decision, I think.
====
What is integer overflow in C?
An integer overflow occurs when you attempt to store inside an integer >>>>>>> variable a value that is larger than the maximum value the variable can >>>>>>> hold. The C standard defines this situation as undefined behaviour >>>>>>> (meaning that anything might happen).
More here: https://www.sciencedirect.com/topics/computer-science/integer-overflow
That definition (at least as far as fixed-point binary goes) is
incompatible with both PL/I's definition of FIXEDOVERFLOW and any
computer architecture that I know of.
That sounds like SIZE.
Yes, but that’s too late to detect a prior overflow in the register.
A register can't produce a SIZE interrupt.
.The SIZE condition can only be raised when a FIXED DECIMAL result is stored.
You are utterly contradicting the Language Reference for (F) and for.
Optimizer/Checker, which says very plainly that SIZE applies to FIXED
BINARY.
Not with IBM's current compilers.
It says that the FIXEDOVERFLOW condition is not raised for FIXED BINARY operations.
This can occur when an intermediate DECIMAL result is stored, as well as >>> when a decimal result is finally assigned to a DECIMAL variable.
If the declaration of a DECIMAL variable is for an odd number of digits, >>> the SIZE condition is raised directly. If an even number of digits is declared,
additional software is required to check the most-significant nibble.
.
where things are being calculated. That’s why PL/I had FIXEDOVERFLOW and >>>> SIZE in the first place, and why there’s a warning that a SIZE may be >>>> reported as FIXEDOVERFLOW in optimized code on FIXED DECIMAL in the 360 >>>> family, which does arithmetic storage-to-storage..
Yes, there can be some exceptions.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 251 |
Nodes: | 16 (2 / 14) |
Uptime: | 23:27:08 |
Calls: | 5,544 |
Calls today: | 3 |
Files: | 11,676 |
Messages: | 5,109,037 |