version 1.26, 2005/12/10 14:14:15 |
version 1.27, 2017/08/31 02:36:21 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/parse/arith.c,v 1.25 2005/11/27 00:07:06 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/arith.c,v 1.26 2005/12/10 14:14:15 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 79 struct oAFUNC afunc0[] = { |
|
Line 79 struct oAFUNC afunc0[] = { |
|
/* O_MAT=6 */ {addmat,submat,mulmat,divmat,pwrmat,chsgnmat,compmat}, |
/* O_MAT=6 */ {addmat,submat,mulmat,divmat,pwrmat,chsgnmat,compmat}, |
/* O_STR=7 */ {addstr,notdef,notdef,notdef,notdef,notdef,compstr}, |
/* O_STR=7 */ {addstr,notdef,notdef,notdef,notdef,notdef,compstr}, |
/* O_COMP=8 */ {addcomp,subcomp,mulcomp,divcomp,pwrcomp,chsgncomp,compcomp}, |
/* O_COMP=8 */ {addcomp,subcomp,mulcomp,divcomp,pwrcomp,chsgncomp,compcomp}, |
/* O_DP=9 */ {addd,subd,muld,divsdc,notdef,chsgnd,compd}, |
/* O_DP=9 */ {addd,subd,muld,divdc,notdef,chsgnd,compd}, |
/* O_USINT=10 */ {notdef,notdef,notdef,notdef,notdef,notdef,compui}, |
/* O_USINT=10 */ {notdef,notdef,notdef,notdef,notdef,notdef,compui}, |
/* O_ERR=11 */ {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef}, |
/* O_ERR=11 */ {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef}, |
/* O_GF2MAT=12 */ {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef}, |
/* O_GF2MAT=12 */ {notdef,notdef,notdef,notdef,notdef,notdef,(int(*)())notdef}, |
Line 96 struct oAFUNC afunc0[] = { |
|
Line 96 struct oAFUNC afunc0[] = { |
|
/* O_QUOTEARG=23 */ {notdef,notdef,notdef,notdef,notdef,notdef,compqa}, |
/* O_QUOTEARG=23 */ {notdef,notdef,notdef,notdef,notdef,notdef,compqa}, |
/* O_MAT=24 */ {AddMatI,SubMatI,MulMatG,notdef,notdef,ChsgnI,(int(*)())notdef}, |
/* O_MAT=24 */ {AddMatI,SubMatI,MulMatG,notdef,notdef,ChsgnI,(int(*)())notdef}, |
/* O_NBP=25 */ {addnbp,subnbp,mulnbp,notdef,pwrnbp,chsgnnbp,compnbp}, |
/* O_NBP=25 */ {addnbp,subnbp,mulnbp,notdef,pwrnbp,chsgnnbp,compnbp}, |
|
/* O_DPM=26 */ {adddpm,subdpm,mulobjdpm,notdef,notdef,chsgndpm,compdpm}, |
}; |
}; |
|
|
struct oAFUNC *afunc = &afunc0[1]; |
struct oAFUNC *afunc = &afunc0[1]; |
Line 174 void arf_mul(VL vl,Obj a,Obj b,Obj *r) |
|
Line 175 void arf_mul(VL vl,Obj a,Obj b,Obj *r) |
|
break; |
break; |
case O_R: |
case O_R: |
/* rat * something; bid > O_R */ |
/* rat * something; bid > O_R */ |
if ( bid == O_VECT || bid == O_MAT ) |
if ( bid == O_VECT || bid == O_MAT || bid == O_DP ) |
(*afunc[mid].mul)(vl,a,b,r); |
(*afunc[mid].mul)(vl,a,b,r); |
else |
else |
notdef(vl,a,b,r); |
notdef(vl,a,b,r); |
Line 194 void arf_mul(VL vl,Obj a,Obj b,Obj *r) |
|
Line 195 void arf_mul(VL vl,Obj a,Obj b,Obj *r) |
|
notdef(vl,a,b,r); |
notdef(vl,a,b,r); |
break; |
break; |
case O_DP: |
case O_DP: |
if ( bid <= O_P ) |
if ( bid <= O_R ) |
(*afunc[O_DP].mul)(vl,a,b,r); |
(*afunc[O_DP].mul)(vl,a,b,r); |
else if ( bid == O_MAT || bid == O_VECT || bid == O_DPV ) |
else if ( bid == O_MAT || bid == O_VECT || bid == O_DPV || bid == O_DPM ) |
(*afunc[bid].mul)(vl,a,b,r); |
(*afunc[bid].mul)(vl,a,b,r); |
else |
else |
notdef(vl,a,b,r); |
notdef(vl,a,b,r); |