BigInteger
Arbitrary-precision integers for values that exceed SmallInteger range.
BigInteger is created automatically when SmallInteger arithmetic overflows the 48-bit range. You never need to create BigIntegers explicitly — they appear transparently from operations like factorial on large numbers, exponentiation, or simply adding beyond SmallInteger limits.
BigInteger supports all the same arithmetic (+, -, *, /, \\, //), comparison (<, >, <=, >=, =), and bitwise (bitAnd:, bitOr:, bitXor:, bitShift:) operators as SmallInteger. Mixed BigInteger/SmallInteger operations are handled automatically — the SmallInt operand is promoted. Mixed BigInteger/Float operations produce Float results.
If a BigInteger result fits back in the SmallInteger range, it is automatically demoted for efficiency.
20 factorial class name >>> #BigInteger
20 factorial > 0 >>> true
20 factorial printString >>> '2432902008176640000'
Instance Methods
primitives
Return the product of the receiver and the argument.
Return the sum of the receiver and the argument.
Return the difference of the receiver and the argument.
Return the integer quotient (truncated toward zero).
Return the integer quotient (truncated toward negative infinity).
Return true if the receiver is less than the argument.
Return true if the receiver is less than or equal to the argument.
Return true if the receiver equals the argument.
Return true if the receiver is greater than the argument.
Return true if the receiver is greater than or equal to the argument.
Return the remainder.
Return the bitwise AND.
Return the bitwise OR.
Shift left by count bits (negative shifts right).
Return the bitwise XOR.
Return a hash value for the receiver.
uncategorized
Return the absolute value.
Convert to Float (may lose precision for very large values).
20 factorial asFloat class name >>> #Float
Convert to SmallInteger (truncates if too large).
Return true if the receiver is zero.
Return the negation of the receiver.
Return a human-readable string representation.
Return -1, 0, or 1 indicating the sign.
20 factorial sign >>> 1