The only extraordinary arithmetic operations on integers are mod and div.
The quotient q of the division with remainder n=qm + r, where 0 <= r<m or m<r <= 0 (depending on the sign of m), for integers n and m != 0.
The remainder r of the division with remainder n=qm + r, where 0 <= r<m or m<r <= 0 (depending on the sign of m), for integers n and m != 0.
True if the integer n is even, otherwise false.
True if the integer n is odd, otherwise false.
True if the non-negative integer n is the square of an integer, false otherwise. If n is a square, its positive square root is also returned.
If the integer n>1 is a power n=b^k of an integer b, with k>1, this function returns true, the minimal positive b and its associated k; if it is not such integer power the function returns false.
If the integer n>1 is k-th power (k>1) of some integer b, so n=b^k, this function returns true, and b; if it is not a k-th integer power the function returns false.
True if the positive integer n is a prime. A rigorous method will be used (but see the section on Primes and Factorization for a complete description of this function).
> print { p : p in [10^10+3..10^10+1000 by 4] |
> IsPrime(p) and IsPrime((p-1) div 2) };
{ 10000000259, 10000000643 }
Returns true if and only if a is integral, which is of course true for every integer n.
Returns true if n fits in a single word in the internal representation of integers in Magma, that is, if | n|<2^(29), false otherwise.
The complex conjugate of n, which will be the integer n itself.
The conjugate of n, which will be the integer n itself.
The norm (in Q) of n, which will be the integer n itself.
The Euclidean norm (length) of n, which will equal the absolute value of n.
The trace (in Q) of n, which will be the integer n itself.
Returns the minimal polynomial of the integer n, which is the monic linear polynomial with constant coefficient n in a univariate polynomial ring R over the integers. (If R has not been created before with a name for its indeterminate, $.1-n will be returned.)
Absolute value of the integer n.
The integral part of the logarithm to the base two of the positive integer n.
Returns both the quotient q and remainder r obtained upon dividing the integer m by the integer n, that is, m = q.n + r, with 0 <= r < |n|.
A random integer lying in the interval [a, b], where a, b are positive integers and a <= b.
A random integer lying in the interval [0, b], where b is a positive integer.
A random integer m such that 0 <= m < 2^n, where n is a small positive integer.
Given a positive integer a, return the integer b= Floor(root n of a), i.e. the integral part of the n-th root of a. (To obtain the root itself (as a real number), a has to be coerced into a real field, and Root can be applied.)
Returns -1, 0 or 1 depending upon whether the integer n is negative, zero or positive, respectively.
The ceiling of the integer n, that is, n itself.
The floor of the integer n, that is, n itself.
This function rounds the integer n to itself.
This function returns the integer truncation of the integer n, that is, n itself.
Given a non-negative integer n, return a squarefree integer x as well as a positive integer y, such that n=xy^2.
Given a positive integer n, return the integer Floor(sqrt n), i.e., the integral part of the square root of the integer n.[Next] [Prev] [Right] [Left] [Up] [Index] [Root]