The last of the three arithmetic interfaces,
MP, exports functions that implement multiple-precision arithmetic on unsigned and two’s-complement integers. Like
MP reveals its representation for
n-bit integers, and the
MP functions operate on integers of a given size. Unlike
XP, the lengths of
MP’s integers are given in bits, and
MP’s functions implement both signed and unsigned arithmetic. Like the
AP functions, the
MP functions enforce the usual suite of checked runtime errors.
MP is intended for applications that need extended-precision arithmetic, but want finer control over allocations, need both unsigned and signed operations, or must mimic two’s-complement
n-bit arithmetic. Examples include compilers ...