Ask Your Question
0

how to check if a polynom is a square

asked 2020-04-17 16:32:38 -0500

I'ld like to put a condition in a programm that looks like:

"if Q is a square, then ..."

Q being a polynom (in GF(p)).

How can I do that ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-04-18 03:36:33 -0500

vdelecroix gravatar image

First of all, there is a function to check if a polynomial is a square

sage: x = polygen(GF(7))
sage: p = 2*x^2 + 6*x + 1
sage: p.is_square()
True

Then you need to learn about conditional statements in Python (if/elif/else): https://docs.python.org/3/tutorial/co...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-04-17 16:32:38 -0500

Seen: 38 times

Last updated: Apr 18