Calculation of the metric is the distance from the point x+yAI to the point (p-1)/2+[(p-1)/2]AI center:=(p-1)/2 if x>center then x:=p - x if y>center then y:=p - y diff_x:=center-x diff_y:=center-y metric:=diff_x^2+diff_y^2*A^2 mod p
Number = 31, Adjoined = √3, Exponent = 1, Jacobi (3, 31) = -1, 31 = 3 mod 4, 31 = 7 mod 8
30
0
30√3
Number of elements = 1
Number = 31, Adjoined = √3, Exponent = 1, Jacobi (3, 31) = -1, 31 = 3 mod 4, 31 = 7 mod 8