(* Sequence of calculations for regular 17-gon.*) (* Generated by Ken Brakke (brakke@susqu.edu) using my ngon.c program.*) a0 = -1.000000000000000 prod = + 4*a0 a1 = (a0 + Sqrt[a0^2 - 4*prod])/2 prod = + 4*a0 a2 = (a0 - Sqrt[a0^2 - 4*prod])/2 prod = + 1*a0 a5 = (a1 - Sqrt[a1^2 - 4*prod])/2 prod = + 1*a0 a6 = (a2 - Sqrt[a2^2 - 4*prod])/2 prod = + 1*a6 a13 = (a5 + Sqrt[a5^2 - 4*prod])/2 x2 = a13/2 Print["Constructed x of vertex 2: ",x2] shouldbe = N[Cos[2*2*Pi/17]] Print["Calculated x of vertex 2: ",shouldbe]