X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/5c3f75ec49019d160806489824fc76652a2ef444..02dfbd5b7af7816959dbd39c1fe628451204e35f:/group-stdops.c diff --git a/group-stdops.c b/group-stdops.c index ec30b4d..12005e7 100644 --- a/group-stdops.c +++ b/group-stdops.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: group-stdops.c,v 1.3 2004/04/17 09:58:37 mdw Exp $ + * $Id$ * * Standard group operations * @@ -71,10 +71,10 @@ int group_check(group *g, ge *x) int group_samep(group *g, group *h) { - return (g->ops == h->ops && - MP_EQ(g->r, h->r) && MP_EQ(g->h, h->h) && - G_EQ(g, g->i, h->i) && G_EQ(g, g->g, h->g) && - G_SAMEP(g, h)); + return (g == h || (g->ops == h->ops && + MP_EQ(g->r, h->r) && MP_EQ(g->h, h->h) && + G_EQ(g, g->i, h->i) && G_EQ(g, g->g, h->g) && + G_SAMEP(g, h))); } /*----- Standard implementations ------------------------------------------*/ @@ -115,10 +115,7 @@ void group_stdsqr(group *g, ge *d, ge *x) { G_MUL(g, d, x, x); } */ void group_stddiv(group *g, ge *d, ge *x, ge *y) -{ - G_INV(g, d, y); - G_MUL(g, d, x, d); -} + { G_INV(g, d, y); G_MUL(g, d, x, d); } /* --- @group_stdtoec@ --- * *