AngouriMath
ExactSquareRoot(PeterO.Numbers.ERational)
Method (no overloads)
Summary
The exact square root of a non-negative rational, or null where it
has none.4/9 gives 2/3 ; 2 gives nothing.
has none.
Remarks
A rational in lowest terms is a square exactly when its numerator and denominator both
are, since a square's prime factorisation has even exponents throughout and the two
share no prime. Asked of each separately, which is why there is no gcd here.
are, since a square's prime factorisation has even exponents throughout and the two
share no prime. Asked of each separately, which is why there is no gcd here.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online