projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
factorial: Fix usage message to fit in with conventions.
[u/mdw/catacomb]
/
group-exp.c
diff --git
a/group-exp.c
b/group-exp.c
index
2ca684c
..
ca9cfb0
100644
(file)
--- a/
group-exp.c
+++ b/
group-exp.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id
: group-exp.c,v 1.2 2004/04/08 01:36:15 mdw Exp
$
+ * $Id$
*
* Exponentiation for abstract groups
*
*
* Exponentiation for abstract groups
*
@@
-55,10
+55,10
@@
void group_stdexp(group *gg, ge *d, ge *x, mp *n)
G_COPY(gg, d, gg->i);
if (n->f & MP_BURN)
G_BURN(gg, t);
G_COPY(gg, d, gg->i);
if (n->f & MP_BURN)
G_BURN(gg, t);
- if (MP_
LEN(n) == 0
)
+ if (MP_
ZEROP(n)
)
;
else {
;
else {
- if (
n->f & MP_NEG
)
+ if (
MP_NEGP(n)
)
G_INV(gg, t, t);
if (MP_LEN(n) < EXP_THRESH)
EXP_SIMPLE(d, t, n);
G_INV(gg, t, t);
if (MP_LEN(n) < EXP_THRESH)
EXP_SIMPLE(d, t, n);
@@
-91,7
+91,7
@@
void group_stdmexp(group *gg, ge *d, const group_expfactor *f, size_t n)
for (i = 0; i < n; i++) {
ff[i].base = G_CREATE(gg);
MP_SHRINK(f[i].exp);
for (i = 0; i < n; i++) {
ff[i].base = G_CREATE(gg);
MP_SHRINK(f[i].exp);
- if (
f[i].exp->f & MP_NEG
)
+ if (
MP_NEGP(f[i].exp)
)
G_INV(gg, ff[i].base, f[i].base);
else
G_COPY(gg, ff[i].base, f[i].base);
G_INV(gg, ff[i].base, f[i].base);
else
G_COPY(gg, ff[i].base, f[i].base);