Returns true if this is a valid power of factor.
true
this
factor
bool isPowerOf(num factor) { final root = this.root(factor); return root > 0.0 && root.isValidInteger; }