DECUS 12-133 MINT

Order Number: XX-9D816-7D

This document describes MINT (Multiple Precision Integer Arithmetic Subroutine), a program library for handling very large integers within DECUS systems.

Here's a summary of its key features:

  • Purpose: Provides arithmetic and input/output subroutines for multiple-precision integers.
  • Compatibility: Designed for use with programs written in FORTRAN or SABR, requiring the MINT.RL file to be loaded.
  • Integer Representation: Integers are stored as N-word, 12*N bit two's complement numbers in successive memory locations, with the least significant word stored first.
  • Pseudo-Accumulator: All arithmetic operations are performed using a central "pseudo-accumulator," where results are stored.
  • Precision Control: The number of words (and thus the precision) for integers can be varied programmatically using the MPREC routine. While the default maximum is 11 words, it can be significantly increased (e.g., to 443 words for 1599 decimal digits) by modifying and reassembling the MINT source code, with a noted impact on core memory and execution time.
  • Routine Set: The library offers a comprehensive set of functions including:

    • Basic arithmetic: Addition (MADD), Subtraction (MSUB), Multiplication (MMPY), Division (MDIV).
    • Logical/Utility: Two's complement (MCOM), Absolute value (MABS), Sign checking (MSGN), Bit shifts (MSCR, MSCL), Remainder (MREM).
    • Storage/I/O: Storing accumulator content (MSTO), Changing input/output base (MBAS), Reading integers (MIN), and Outputting integers (MOUT).
  • Error Handling: Includes basic error messages for conditions like division by zero (which returns the largest positive integer and continues) or attempting to set a precision exceeding allocated memory (which terminates execution).

  • Disclaimer: As a DECUS Program Library user contribution, it is provided without warranty, explicit or implied, and DECUS assumes no responsibility for its quality control or functioning.
XX-9D816-7D
October 1972
11 pages
Quality

Original
0.6MB

Site structure and layout ©2025 Majenko Technologies