diff options
author | Damien George <damien.p.george@gmail.com> | 2017-07-25 11:49:22 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-07-25 11:49:22 +1000 |
commit | 04552ff71b6c722b21597d93481f024c72457cef (patch) | |
tree | fdbc66843e079a78cbf964aa6308ab5db78a42d1 /py/mpz.c | |
parent | 4d1fb6107fdedb0dda8dfb1491c033bf731222c6 (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.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -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; } |