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 integer- nsuch that in- QQ(- x) (where- xis a primitive- n-th root of unity) there exists an element- ysuch that y^2=z.
- minimalRootOfUnityForSquareRootOfRadicalInteger: Integer -> PositiveInteger
- minimalRootOfUnityForSquareRootOfRadicalInteger(z)returns an integer- nsuch that in- ZZ(- x) (where- xis a primitive- n-th root of unity) there exists an element- ysuch that y^2=z. We assume that- zis a radical integer, i.e. no square of a prime is a factor of- z.