AngouriMath

Navigation

← Back to list of members

TryPerfectPower​(AngouriMath.​Entity.​Number.​Rational,​AngouriMath.​Entity.​Number.​Rational@,​System.​Int32@)

 Method (no overloads)

Summary

value as root ^ exponent for a positive rational
root and the largest whole exponent of at least
2 that fits: 16/9 is (4/3)^2, 64 is 2^6, 1/8 is
(1/2)^3. Only for a positive value whose numerator and denominator both fit in
64 bits; anything else is not a perfect power for this purpose.

Remarks

Positive only, deliberately: -8 is (-2)^3 and ln(-8) is
ln 8 + i pi while 3 ln(-2) is 3 ln 2 + 3 i pi, so the identity a
caller wants this for does not survive a negative root.

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online