The root command computes A^(1/B) where A and B are numeric. If a third argument P is given it is the modulus and we solve X^B = A mod P. If P is zero then root computes the integer floor of A^(1/B).
root(16,2); 4. root(24,3,0); 2 # 3 = x^5 mod 13 root(3,5,13); 9 (9^5) % 13; 3