For root function, catch negative k in bigfloat rather than mpfr.