You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
det runtime: a zero divisor without ON SIZE ERROR throws in the port; the oracle leaves the receiver unchanged #4655
A zero divisor in COMPUTE / DIVIDE without ON SIZE ERROR: the oracle (GnuCOBOL 3.1.2 -std=ibm) sets the size-error exception and leaves the receiver unchanged (cob_decimal_div makes the intermediate NaN, cob_decimal_get_field stores nothing); the det port's Cobol.divide throws ArithmeticException and the run ends.
Measured 2026-10-07 (R PIC 999V99 VALUE 12.34, Z0 = 0):
COMPUTE R = A / Z0 -> oracle R = 012.34, rc 0; det port: ArithmeticException.
DIVIDE Z0 INTO A GIVING R -> oracle R unchanged.
ARITHMETIC-OSVS (#4287) makes a zero divisor reachable from non-zero data: a divisor expression whose intermediate has fewer places than the target loses its low-order digits (A / (C ** 3) with C = 7 and dmax 5 divides by 0 on the oracle). Found by the randomized differential run of #4287.
z/OS: a decimal divide by zero without ON SIZE ERROR is a data exception / abend (0CB), so neither side is IBM; the register has no entry for it.
Proposal
Decide which behaviour the det port models (the oracle's, so proofs can see it, plus a register entry for the z/OS abend), then make Cobol.divide / the store path carry NaN as libcob does (receiver unchanged, the statement's SIZE ERROR state set).
Activity
det gen: a distinct name for the lifted DIVIDE INTO quotient (mypy) (#…
det runtime: a zero divisor leaves the receivers unchanged, as the or…
det parse: abbreviated 'OR NOT = x' relation; pin conditions holes 1-2 (
det: a float zero divisor is libcob's NaN; a phrase binds to the inne…
det: an unsigned binary ADD / SUBTRACT wraps as cobc's native arithme…