Abstract: A method of encoding variable-precision numeric types that includes determining a fixed numeric storage size used by a computer system, encoding numeric values that do not fit into the fixed size in a variable-precision numeric value allocated on a program heap and generating a reference to point to the variable-precision numeric value on the program heap.