[flint] 01/24: correctly handle 0^0 Conflicts:
felix salfelder
felix-guest at moszumanska.debian.org
Wed Jun 25 11:16:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository flint.
commit 6ea25083eb4152c23ac32259130527877dfe6d00
Author: Curtis Bright <cbright at gmail.com>
Date: Wed May 21 11:20:58 2014 -0400
correctly handle 0^0
Conflicts:
ulong_extras/powmod2_preinv.c
---
ulong_extras/powmod2_preinv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ulong_extras/powmod2_preinv.c b/ulong_extras/powmod2_preinv.c
index f01ddba..93ff950 100644
--- a/ulong_extras/powmod2_preinv.c
+++ b/ulong_extras/powmod2_preinv.c
@@ -31,8 +31,8 @@ mp_limb_t
n_powmod2_ui_preinv(mp_limb_t a, mp_limb_t exp, mp_limb_t n, mp_limb_t ninv)
{
mp_limb_t x, y;
-
- if (n == UWORD(1)) return UWORD(0);
+
+ if (n == UWORD(1) || (a == 0 && exp != 0)) return UWORD(0);
x = UWORD(1);
y = a;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/flint.git
More information about the debian-science-commits
mailing list