Integer roots: Difference between revisions
m
→{{header|Phix}}: moe comment
m (→{{header|Phix}}: comment) |
m (→{{header|Phix}}: moe comment) |
||
Line 700:
function integer_root(integer n, object a)
-- a must be integer or string
-- (were a an mpz you would have to invoke mpz_init_set(), not mpz_init(),
-- or better yet pass a as the second parameter of mpz_root() instead.)
mpz res = mpz_init(a)
{} = mpz_root(res,res,n)
|