Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find the right way to compute the square root of a number defined in a finite field. For example,

<< FiniteFields`
In[18]:= Sqrt[GF[17][{8}]]
Out[18]= Sqrt[Subscript[{8}, 17]]

Results in an incorrect answer. The correct answer is 5.

share|improve this question
up vote 4 down vote accepted
PowerMod[n, 1/2, f]


PowerMod[8, 1/2, 17]

(* 5 *)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.