version 1.1, 2018/09/19 05:45:06 |
version 1.2, 2018/09/28 08:20:27 |
|
|
* 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: OpenXM_contrib2/asir2018/builtin/pf.c,v 1.1 2018/09/19 05:45:06 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "math.h" |
#include "math.h" |
Line 216 void make_itri() { |
|
Line 216 void make_itri() { |
|
OALLOC(asindef->deriv,1); |
OALLOC(asindef->deriv,1); |
args = (Obj *)ALLOCA(2*sizeof(Obj)); |
args = (Obj *)ALLOCA(2*sizeof(Obj)); |
mulp(CO,x,x,&xx); subp(CO,(P)ONE,xx,(P *)&args[0]); |
mulp(CO,x,x,&xx); subp(CO,(P)ONE,xx,(P *)&args[0]); |
STOQ(-2,mtwo); divz(ONE,mtwo,(Z *)&args[1]); |
STOZ(-2,mtwo); divz(ONE,mtwo,(Z *)&args[1]); |
_mkpfins(powdef,args,&v); MKV(v,t); |
_mkpfins(powdef,args,&v); MKV(v,t); |
asindef->deriv[0] = (Obj)t; |
asindef->deriv[0] = (Obj)t; |
|
|
Line 257 void make_ihyp() { |
|
Line 257 void make_ihyp() { |
|
OALLOC(asinhdef->deriv,1); |
OALLOC(asinhdef->deriv,1); |
args = (Obj *)ALLOCA(2*sizeof(Obj)); |
args = (Obj *)ALLOCA(2*sizeof(Obj)); |
mulp(CO,x,x,&xx); addp(CO,(P)ONE,xx,(P *)&args[0]); |
mulp(CO,x,x,&xx); addp(CO,(P)ONE,xx,(P *)&args[0]); |
STOQ(-2,mtwo); divz(ONE,mtwo,(Z *)&args[1]); |
STOZ(-2,mtwo); divz(ONE,mtwo,(Z *)&args[1]); |
_mkpfins(powdef,args,&v); MKV(v,t); |
_mkpfins(powdef,args,&v); MKV(v,t); |
asinhdef->deriv[0] = (Obj)t; |
asinhdef->deriv[0] = (Obj)t; |
|
|
Line 415 void Pfunargs_ext(NODE arg,LIST *rp) |
|
Line 415 void Pfunargs_ext(NODE arg,LIST *rp) |
|
|
|
d0 = a0 = 0; |
d0 = a0 = 0; |
for ( i = 0; i < pf->argc; i++ ) { |
for ( i = 0; i < pf->argc; i++ ) { |
NEXTNODE(d0,d); STOQ(ad[i].d,q); BDY(d) = (pointer)q; |
NEXTNODE(d0,d); STOZ(ad[i].d,q); BDY(d) = (pointer)q; |
NEXTNODE(a0,a); BDY(a) = (pointer)ad[i].arg; |
NEXTNODE(a0,a); BDY(a) = (pointer)ad[i].arg; |
} |
} |
NEXT(d) = 0; NEXT(a) = 0; MKLIST(alist,a0); MKLIST(dlist,d0); |
NEXT(d) = 0; NEXT(a) = 0; MKLIST(alist,a0); MKLIST(dlist,d0); |
Line 433 void Pvtype(NODE arg,Z *rp) |
|
Line 433 void Pvtype(NODE arg,Z *rp) |
|
if ( !p || ID(p) != O_P ) |
if ( !p || ID(p) != O_P ) |
*rp = 0; |
*rp = 0; |
else |
else |
STOQ((long)VR(p)->attr,*rp); |
STOZ((long)VR(p)->attr,*rp); |
} |
} |
|
|
extern NODE user_int_handler,user_quit_handler; |
extern NODE user_int_handler,user_quit_handler; |
Line 618 void Pmapat(NODE arg,Obj *rp) |
|
Line 618 void Pmapat(NODE arg,Obj *rp) |
|
error("mapat : invalid function specification"); |
error("mapat : invalid function specification"); |
if ( !INT(ARG1(arg)) ) |
if ( !INT(ARG1(arg)) ) |
error("mapat : invalid position"); |
error("mapat : invalid position"); |
pos = QTOS((Q)ARG1(arg)); |
pos = ZTOS((Q)ARG1(arg)); |
node = NEXT(NEXT(arg)); |
node = NEXT(NEXT(arg)); |
len = length(node); |
len = length(node); |
if ( pos >= len ) |
if ( pos >= len ) |