Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

Delphi-LongInteger

Delphi Long-integer arithmetic

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

Delphi Long-integer arithmetic

The unit XMathUtils.pas provides routines for calculations of positive (unsigned) integer values of any length. Variables, declared as such extra-long integers, can be used with common operators (e.g. +, -, * and /) in the source code (see Embarcadero documentation).

Beyond that the following functions are supported:

  • Checks for zero, even and odd values
  • Conversions from and to decimal and to hex strings
  • Functions similar to DivMod and MulDiv
  • Functions to compute power and square root
  • Functions to compute factorials and binomials

In addition to the unit, the package contains a demo program and a program for computing any number of digits of Pi using the algorithm according to P. Borwein.