aboutsummaryrefslogtreecommitdiff
path: root/py/mpz.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-07-25 11:49:22 +1000
committerDamien George <damien.p.george@gmail.com>2017-07-25 11:49:22 +1000
commit04552ff71b6c722b21597d93481f024c72457cef (patch)
treefdbc66843e079a78cbf964aa6308ab5db78a42d1 /py/mpz.c
parent4d1fb6107fdedb0dda8dfb1491c033bf731222c6 (diff)
py: Implement raising a big-int to a negative power.
Before this patch raising a big-int to a negative power would just return 0. Now it returns a floating-point number with the correct value.
Diffstat (limited to 'py/mpz.c')
-rw-r--r--py/mpz.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/py/mpz.c b/py/mpz.c
index 80473df88..f58e262e2 100644
--- a/py/mpz.c
+++ b/py/mpz.c
@@ -946,10 +946,6 @@ bool mpz_is_pos(const mpz_t *z) {
return z->len > 0 && z->neg == 0;
}
-bool mpz_is_neg(const mpz_t *z) {
- return z->len > 0 && z->neg != 0;
-}
-
bool mpz_is_odd(const mpz_t *z) {
return z->len > 0 && (z->dig[0] & 1) != 0;
}