Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
0

how to check if a polynom is a square

asked 4 years ago

Dasiatys gravatar image

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 ?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 4 years ago

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...

Preview: (hide)
link

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: 4 years ago

Seen: 477 times

Last updated: Apr 18 '20