Further Reading — Chapter 5: Numeric Precision and Arithmetic

IBM Documentation

  • Enterprise COBOL for z/OS Language Reference — "Arithmetic Statements" chapter. Covers all forms of ADD, SUBTRACT, MULTIPLY, DIVIDE, and COMPUTE with complete syntax diagrams.

  • Enterprise COBOL for z/OS Programming Guide — "Controlling Arithmetic Precision" section. Essential reading on intermediate result rules, the ARITH compiler option, and how the compiler handles complex expressions.

  • Enterprise COBOL Migration Guide — "Arithmetic Differences" section. Documents how arithmetic behavior varies between compiler versions and options.

Textbooks

  • Goldberg, D. "What Every Computer Scientist Should Know About Floating-Point Arithmetic." ACM Computing Surveys, 1991. — The definitive explanation of why floating-point arithmetic is inexact. Essential background for understanding why COMP-3 matters.

  • Murach, M. Murach's Mainframe COBOL. Mike Murach & Associates. — Chapter on arithmetic provides excellent worked examples with real-world financial calculations.

  • Stern, N., Stern, R., & Ley, J. COBOL for the 21st Century. — Arithmetic chapter with good coverage of ROUNDED and ON SIZE ERROR.

Standards and Regulations

  • IEEE 754-2019: Standard for Floating-Point Arithmetic. Defines the binary representation used by COMP-1 and COMP-2. Understanding this standard clarifies why floating-point arithmetic is unsuitable for financial calculations.

  • Federal Reserve Regulation E: Electronic Fund Transfer Act. Requires financial institutions to credit and debit exact amounts — one of the regulatory drivers for exact decimal arithmetic.

Online Resources

  • IBM Developer: "Packed Decimal Arithmetic on z/Architecture" — Technical deep dive into how the hardware executes COMP-3 arithmetic instructions.

  • GnuCOBOL FAQ: Arithmetic and Precision — Notes on how GnuCOBOL implements arithmetic, including differences from IBM Enterprise COBOL.

Topics for Further Exploration

  • Currency conversion arithmetic: How to handle calculations involving multiple currencies with different decimal precision (e.g., Japanese yen has no decimals; Bahraini dinar has three).

  • Tax withholding tables: Implementing graduated tax brackets in COBOL, where each bracket has a different rate and the boundaries must be computed exactly.

  • Actuarial calculations: Insurance premium calculations involve complex mathematical formulas with annuity factors and mortality tables. These push COBOL's precision limits and often require ARITH(EXTEND).

  • COBOL and decimal floating-point: IBM z/Architecture supports decimal floating point (DFP) in hardware, which combines the range of floating point with the exactness of decimal. Enterprise COBOL can leverage this through compiler options. See the IBM DFP documentation for details.