version 1.2, 2018/09/28 08:20:29 |
version 1.3, 2019/11/12 10:53:23 |
|
|
* 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/asir2018/parse/puref.c,v 1.1 2018/09/19 05:45:08 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/parse/puref.c,v 1.2 2018/09/28 08:20:29 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 89 void searchc(char *name,FUNC *fp) |
|
Line 89 void searchc(char *name,FUNC *fp) |
|
*fp = 0; |
*fp = 0; |
} |
} |
|
|
|
#if defined(INTERVAL) |
void mkpf(char *name,Obj body,int argc,V *args, |
void mkpf(char *name,Obj body,int argc,V *args, |
|
int (*parif)(),double (*libmf)(), int (*simp)(), void (**intervalfunc)(), PF *pfp) |
|
#else |
|
void mkpf(char *name,Obj body,int argc,V *args, |
int (*parif)(),double (*libmf)(), int (*simp)(),PF *pfp) |
int (*parif)(),double (*libmf)(), int (*simp)(),PF *pfp) |
|
#endif |
{ |
{ |
PF pf; |
PF pf; |
NODE node; |
NODE node; |
Line 98 void mkpf(char *name,Obj body,int argc,V *args, |
|
Line 103 void mkpf(char *name,Obj body,int argc,V *args, |
|
NEWPF(pf); pf->name = name; pf->body = body; |
NEWPF(pf); pf->name = name; pf->body = body; |
pf->argc = argc; pf->args = args; pf->pari = parif; pf->simplify = simp; |
pf->argc = argc; pf->args = args; pf->pari = parif; pf->simplify = simp; |
pf->libm = libmf; |
pf->libm = libmf; |
|
#if defined(INTERVAL) |
|
pf->intervalfunc = intervalfunc; |
|
#endif |
for ( node = pflist; node; node = NEXT(node) ) |
for ( node = pflist; node; node = NEXT(node) ) |
if ( !strcmp(((PF)BDY(node))->name,name) ) |
if ( !strcmp(((PF)BDY(node))->name,name) ) |
break; |
break; |
Line 723 void simplify_abs_ins(PFINS ins,Obj *rp) |
|
Line 731 void simplify_abs_ins(PFINS ins,Obj *rp) |
|
MKReal(t,r); *rp = (Obj)r; |
MKReal(t,r); *rp = (Obj)r; |
} else if ( !ad[0].d && BIGFLOAT(a) ) { |
} else if ( !ad[0].d && BIGFLOAT(a) ) { |
arg0.body = (pointer)a; arg0.next = 0; |
arg0.body = (pointer)a; arg0.next = 0; |
mp_abs(&arg0,(Num *)rp); |
mp_abs(&arg0,rp); |
|
#if defined(INTERVAL) |
|
} else if ( !ad[0].d && ITVD(a) ) { |
|
absintvald((IntervalDouble)a,(IntervalDouble*)rp); |
|
} else if ( !ad[0].d && ITVF(a) ) { |
|
absintvalp((Itv)a,(Itv*)rp); |
|
#endif |
} else simplify_elemfunc_ins(ins,rp); |
} else simplify_elemfunc_ins(ins,rp); |
} |
} |
|
|