Previous Up Next

Examples

An integer n in ℤ/13ℤ:

n:=12%13

A vector V in ℤ/13ℤ:

V:=[1,2,3]%13}

or:

V:=[1%13,2%13,3%13]

A matrix A in ℤ/13ℤ:

A:=[[1,2,3],[2,3,4]]%13

or:

A:=[[1%13,2%13,3%13],[[2%13,3%13,4%13]]

A polynomial A in ℤ/13ℤ[x] in symbolic representation:

A:=(2*x^2+3*x-1)%13

or:

A:=2%13*x^2+3%13*x-1%13

A polynomial A in ℤ/13ℤ[x] in list representation:

A:=poly1[1,2,3]%13

or:

A:=poly1[1%13,2%13,3%13]

To recover an object obj with integer coefficients instead of modular coefficients, input obj%0. For example:

obj:=4%7;: obj%0
     
−3           
Remark.

Most Xcas functions that work on integers or polynomials with integer coefficients will often work analogously on ℤ/pℤ or ℤ/pℤ[x], with the obvious exception that the input and output will be modular. They will be listed in the remaining subsections. For some commands in ℤ/pℤ or in ℤ/pℤ[x], p must be a prime integer.


Previous Up Next