Integers and the Integer Constructor
Calling Sequence
Parameters
Description
Integer(x)
x
-
expression
An integer is an optionally signed, arbitrary-length sequence of one or more decimal digits. The maximum length of an integer is system dependent and can be obtained by using kernelopts(maxdigits).
The Integer(x) constructor function returns
x if x is a positive or negative integer.
symbolic infinity if x is infinity.
undefined if x is a symbolic undefined.
Integer(Re(x)) + I * Integer(Im(x)) if x is of type nonreal.
Otherwise, it returns unevaluated.
The integer 0 does not have a sign (compare the floating-point zeros, +0.0 and -0.0).
In addition to arithmetic operators, some basic functions that operate on integers are:
abs
sign
min
max
factorial
irem
iquo
modp
mods
mod
isqrt
iroot
isprime
ifactor
ifactors
igcd
ilcm
igcdex
iratrecon
rand
There are also many other functions for integers in the NumberTheory and combinat packages (including binomial coefficients, Fibonacci numbers, Stirling numbers, Jacobi symbol, and Euler's totient function).
See Also
combinat
infinity
NumberTheory
type
type/integer
type/numeric
undefined
Download Help Document