polynomial calculations over Z/Zp (for prime p)?
12-24-2013, 03:49 PM
Post: #6
 Han Senior Member Posts: 1,883 Joined: Dec 2013
RE: polynomial calculations over Z/Zp (for prime p)?
(12-24-2013 11:56 AM)Jeff Nye Wrote:
(12-24-2013 04:09 AM)Han Wrote:
Code:
 p:=3; p1:=[ 12 13 -20 5 ] % p; p2:=(12x^3 + 13x^2 - 20x + 5) % p; p3:=poly[ 12 13 -20 5 ] % p;

These didn't work for me (using the latest firmware).

However, last night I stumbled upon the CAS %%(n,p) operator, which seems to be the % operator in xcas. With %% instead of %, example p1 worked fine. Example p2 produces a polynomial with non-modular coefficients. For example p3, I needed to say poly([ 12 13 -20 5 ] %% p).

Linear algebra seems to work with integers mod p. The expression [[4,3],[5,1]]%%3 defines a matrix of integers mod 3.

Thank you for the corrections

Graph 3D | QPI | SolveSys
 « Next Oldest | Next Newest »

 Messages In This Thread polynomial calculations over Z/Zp (for prime p)? - Jeff Nye - 12-24-2013, 04:00 AM RE: polynomial calculations over Z/Zp (for prime p)? - Han - 12-24-2013, 04:09 AM RE: polynomial calculations over Z/Zp (for prime p)? - Jeff Nye - 12-24-2013, 11:56 AM RE: polynomial calculations over Z/Zp (for prime p)? - Han - 12-24-2013 03:49 PM RE: polynomial calculations over Z/Zp (for prime p)? - Alberto Candel - 12-24-2013, 07:04 AM RE: polynomial calculations over Z/Zp (for prime p)? - Alberto Candel - 12-24-2013, 03:39 PM RE: polynomial calculations over Z/Zp (for prime p)? - Alberto Candel - 12-24-2013, 04:10 PM RE: polynomial calculations over Z/Zp (for prime p)? - parisse - 12-25-2013, 07:55 AM

User(s) browsing this thread: 1 Guest(s)