DESCRIPTION

All basic math operations are overloaded if you declare your big integers as

$i = new Math::BigInt '123 456 789 123 456 789';

Canonical notation

Big integer value are strings of the form /^[+-]\d+$/ with leading zeros suppressed.

Input

Input values to these routines may be strings of the form /^\s*[+-]?[\d\s]+$/.

Output

Output values always always in canonical form

Actual math is done in an internal format consisting of an array whose first element is the sign (/^[+-]$/) and whose remaining elements are base 100000 digits with the least significant digit first. The string 'NaN' is used to represent the result when input arguments are not numbers, as well as the result of dividing by zero.