summaryrefslogtreecommitdiff
path: root/src/mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mp.c')
-rw-r--r--src/mp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mp.c b/src/mp.c
index 30f69f4..7b224c6 100644
--- a/src/mp.c
+++ b/src/mp.c
@@ -435,6 +435,8 @@ mp_root(const MPNumber *x, int64_t n, MPNumber *z)
if (n < 0)
{
+ mpc_ui_div(z->num, 1, x->num, MPC_RNDNN);
+
if (n == INT64_MIN)
p = (uint64_t) INT64_MAX + 1;
else