diff options
author | mbkma <[email protected]> | 2020-08-26 20:19:31 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-09-04 18:26:07 +0200 |
commit | 81aa78009bcb2bc07abfb6cd3953e24ae3979dd8 (patch) | |
tree | 079719b8d6d671830d4efe1796562e3df55d6440 /src/mp.c | |
parent | c7658b5a7c5ecbabb3390844f19ba43626825554 (diff) | |
download | mate-calc-81aa78009bcb2bc07abfb6cd3953e24ae3979dd8.tar.bz2 mate-calc-81aa78009bcb2bc07abfb6cd3953e24ae3979dd8.tar.xz |
fix calulation of x^q, where 1/q is a negative integer
Diffstat (limited to 'src/mp.c')
-rw-r--r-- | src/mp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |