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 integern
such that inQQ
(x
) (wherex
is a primitiven
-th root of unity) there exists an elementy
such that y^2=z.
- minimalRootOfUnityForSquareRootOfRadicalInteger: Integer -> PositiveInteger
minimalRootOfUnityForSquareRootOfRadicalInteger(z)
returns an integern
such that inZZ
(x
) (wherex
is a primitiven
-th root of unity) there exists an elementy
such that y^2=z. We assume thatz
is a radical integer, i.e. no square of a prime is a factor ofz
.