|
D.7.2.11 pcheck
Procedure from library solve.lib (see solve_lib).
- Usage:
- pcheck(i,l [, d] ); i=ideal, l=list, d=integer,
d>0: precision in digits for near-zero determination
- Assume:
- the ground field has char 0;
l is a list of numbers
- Return:
- 1 iff all elements of l are roots of i, else 0
Example:
| LIB "solve.lib";
ring r = 0,(x,y),lp;
// compute the intersection points of two curves
ideal s= x2 + y2 - 10, x2 + xy + 2y2 - 16;
lex_solve(stdfglm(s),10);
==> // name of new ring: rC
==> // list of roots: rlist
rlist;
==> [1]:
==> [1]:
==> 2.8284271247
==> [2]:
==> 1.4142135624
==> [2]:
==> [1]:
==> -2.8284271247
==> [2]:
==> -1.4142135624
==> [3]:
==> [1]:
==> 1
==> [2]:
==> -3
==> [4]:
==> [1]:
==> -1
==> [2]:
==> 3
ideal s=imap(r,s);
pcheck(s,rlist);
==> 1
|
|