A method and apparatus for processing numerical values in a computer
program. In various embodiments, the invention provides an arbitrary and
expandable high-precision datatype. The datatype encapsulates
large-integer data and associated operators. The large-integer data has
runtime expandable precision, and the operations perform functions on
large-integer data and system integer data in a manner that is
functionally equivalent to corresponding language-provided integer
operations. The language-provided integer operations are overloaded with
the operations of the large-integer datatype, whereby a user is
unburdened with special commands and syntax, and large-integer data is
inter-operable with system integer data.