=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/arith.c,v retrieving revision 1.21 retrieving revision 1.24 diff -u -p -r1.21 -r1.24 --- OpenXM_contrib2/asir2000/parse/arith.c 2005/09/27 03:00:21 1.21 +++ OpenXM_contrib2/asir2000/parse/arith.c 2005/11/25 07:18:32 1.24 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/arith.c,v 1.20 2005/04/07 08:33:12 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/arith.c,v 1.23 2005/11/16 23:42:54 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -93,6 +93,7 @@ struct oAFUNC afunc[] = { /* O_DPV=22 */ {adddv,subdv,muldv,notdef,notdef,chsgndv,compdv}, /* O_QUOTEARG=23 */ {notdef,notdef,notdef,notdef,notdef,notdef,compqa}, /* O_MAT=24 */ {AddMatI,SubMatI,MulMatG,notdef,notdef,ChsgnI,(int(*)())notdef}, +/* O_NBP=25 */ {addnbp,subnbp,mulnbp,notdef,pwrnbp,chsgnnbp,(int(*)())notdef}, }; void arf_init() { @@ -170,7 +171,7 @@ Obj a,b,*r; (*afunc[mid].mul)(vl,a,b,r); else { switch ( aid ) { - case O_N: case O_P: + case O_N: case O_P: case O_NBP: (*afunc[mid].mul)(vl,a,b,r); break; case O_R: @@ -260,14 +261,14 @@ Obj a,e,*r; *r = 0; else mkpow(vl,a,e,r); - } else if ( OID(a) == O_QUOTE || OID(e) == O_QUOTE ) - (*(afunc[O_QUOTE].pwr))(vl,a,e,r); - else if ( !e ) { + } else if ( !e ) { if ( OID(a) == O_MAT ) (*(afunc[O_MAT].pwr))(vl,a,e,r); else *r = (pointer)ONE; - } else if ( (OID(e) <= O_N) && INT(e) ) { + } else if ( OID(a) == O_QUOTE || OID(e) == O_QUOTE ) + (*(afunc[O_QUOTE].pwr))(vl,a,e,r); + else if ( (OID(e) <= O_N) && INT(e) ) { if ( (OID(a) == O_P) && (SGN((Q)e) < 0) ) { if ( allow_laurent ) (*(afunc[O_P].pwr))(vl,a,e,r);