Скачать tInfInt - Unlimited Integers Arithmetic Object

23.07.1993
Скачать файл (15,23 Кб)

{****************************************************************}
{*                             INFINT.DOC                        }
{****************************************************************}

Arithmetic with integers of (almost) unlimited size.

The file INFINT.ZIP contains the following files :

  • INFINT.DOC This File
  • INFINT.PAS BP 7 Source of the TInfInt Object.
  • PELL2.PAS Demo program, that solves Pell's equation abs(x*x - n*y*y)=1
  • BERNZAHL.PAS Demo Program, that calculates Bernoulli-numbers.

The Problem

Sometimes it is necessary to do arithmetic with integer numbers that are much bigger than the numbers a ordinary "integer" or "longint" variable can hold, and one has to keep even the last decimal, so using reals is not a solution. The "TInfint" object soves this problem by defining an integer with a size that is only limited by the available heap space. (under DPMI this can be a lot). I wrote the first version of this "library" in 1987 in a work to get my diploma in mathematics in Turbo Pascal 3.0. Now I revised it to use the advantages of BP 7.