version 1.1, 2018/09/19 05:45:06 |
version 1.3, 2019/10/17 03:03:12 |
|
|
/* |
/* |
* $OpenXM$ |
* $OpenXM: OpenXM_contrib2/asir2018/builtin/isolv.c,v 1.2 2019/06/04 07:11:23 kondoh Exp $ |
*/ |
*/ |
|
|
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
#include "version.h" |
#include "version.h" |
|
|
#if defined(INTERVAL) |
#if defined(INTERVAL) |
|
|
static void Solve(NODE, Obj *); |
static void Solve(NODE, Obj *); |
static void NSolve(NODE, Obj *); |
static void NSolve(NODE, Obj *); |
|
|
|
/* in builtin/vars.c */ |
|
void Pvars(); |
|
|
|
/* */ |
void Solve1(P, Q, pointer *); |
void Solve1(P, Q, pointer *); |
void Sturm(P, VECT *); |
void Sturm(P, VECT *); |
void boundbody(P, Q *); |
void boundbody(P, Q *); |
void binary(int , MAT); |
void binary(int , MAT); |
void separate(Q, Q, VECT, Q, Q, int, int, MAT, int *); |
void separate(Q, Q, VECT, Q, Q, int, int, MAT, int *); |
void ueval(P, Q, Q *); |
void ueval(P, Q, Q *); |
|
int stumq(VECT, Q); |
|
|
|
|
|
// in engine/bf.c |
|
Num tobf(Num,int); |
|
|
struct ftab isolv_tab[] = { |
struct ftab isolv_tab[] = { |
{"solve", Solve, 2}, |
{"solve", Solve, 2}, |
{"nsolve", NSolve, 2}, |
{"nsolve", NSolve, 2}, |
|
|
V v; |
V v; |
Q eps; |
Q eps; |
|
|
|
|
|
*rp = 0; |
|
#if 0 |
p = (pointer)ARG0(arg); |
p = (pointer)ARG0(arg); |
if ( !p ) { |
if ( !p ) { |
*rp = 0; |
*rp = 0; |
|
|
default: |
default: |
*rp = 0; |
*rp = 0; |
} |
} |
|
#endif |
} |
} |
|
|
static void |
static void |
NSolve(arg, rp) |
NSolve(NODE arg, Obj *rp) |
NODE arg; |
|
Obj *rp; |
|
{ |
{ |
pointer p, Eps; |
pointer p, Eps; |
pointer root; |
pointer root; |
|
|
Itv iv; |
Itv iv; |
BF breal; |
BF breal; |
|
|
|
*rp = 0; |
|
#if 0 |
|
|
p = (pointer)ARG0(arg); |
p = (pointer)ARG0(arg); |
if ( !p ) { |
if ( !p ) { |
*rp = 0; |
*rp = 0; |
|
|
for (m0 = BDY((LIST)root), n0 = 0; m0; m0 = NEXT(m0)) { |
for (m0 = BDY((LIST)root), n0 = 0; m0; m0 = NEXT(m0)) { |
m = BDY((LIST)BDY(m0)); |
m = BDY((LIST)BDY(m0)); |
miditvp(BDY(m), &r); |
miditvp(BDY(m), &r); |
ToBf(r, &breal); |
//ToBf(r, &breal); |
|
breal = (BF)tobf(r, DEFAULTPREC); |
NEXTNODE( n0, n ); |
NEXTNODE( n0, n ); |
MKNODE(ln0, breal, NEXT(m)); |
MKNODE(ln0, breal, NEXT(m)); |
MKLIST(listp, ln0); |
MKLIST(listp, ln0); |
|
|
} |
} |
|
|
int |
int |
stumq(s, val) |
stumq(VECT s, Q val) |
VECT s; |
|
Q val; |
|
{ |
{ |
int len, i, j, c; |
int len, i, j, c; |
P *ss; |
P *ss; |
|
|
*rp = t; |
*rp = t; |
} |
} |
} |
} |
|
#endif |
} |
} |
#endif |
#endif |