MinimalSquareRootΒΆ
qetasqrt.spad line 116 [edit on github]
MinimalSquareRoot provides (helper) functions to express a square root of an integer or rational number in terms of a n-th root of unity.
- minimalRootOfUnityForSquareRootOf: Fraction Integer -> PositiveInteger
minimalRootOfUnityForSquareRootOf(z)returns an integernsuch that inQQ(x) (wherexis a primitiven-th root of unity) there exists an elementysuch that y^2=z.
- minimalRootOfUnityForSquareRootOfRadicalInteger: Integer -> PositiveInteger
minimalRootOfUnityForSquareRootOfRadicalInteger(z)returns an integernsuch that inZZ(x) (wherexis a primitiven-th root of unity) there exists an elementysuch that y^2=z. We assume thatzis a radical integer, i.e. no square of a prime is a factor ofz.