| #### D.8.3.3 ures_solve Procedure from library `solve.lib` (see solve_lib). Usage: ures_solve(i [, k, p] ); i = ideal, k, p = integers k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky, k=1: use resultant matrix of Macaulay which works only for homogeneous ideals, p>0: defines precision of the long floats for internal computation if the basering is not complex (in decimal digits), (default: k=0, p=30) Assume: i is a zerodimensional ideal given by a quadratic system, that is, nvars(basering) = ncols(i) = number of vars actually occurring in i, Return: If the ground field is the field of complex numbers: list of numbers (the complex roots of the polynomial system i=0). Otherwise: ring `R` with the same number of variables but with complex coefficients (and precision p). `R` comes with a list `SOL` of numbers, in which complex roots of the polynomial system i are stored: Example:
    LIB "solve.lib";
    // compute the intersection points of two curves
    ring rsq = 0,(x,y),lp;
    ideal gls=  x2 + y2 - 10, x2 + xy + 2y2 - 16;
    def R=ures_solve(gls,0,16);
    ==>
    ==> // 'ures_solve' created a ring, in which a list SOL of numbers (the compl\
       ex
    ==> // solutions) is stored.
    ==> // To access the list of complex solutions, type (if the name R was assig\
       ned
    ==> // to the return value):
    ==>         setring R; SOL;
    setring R; SOL;
    ==> [1]:
    ==>    [1]:
    ==>       -2.82842712474619
    ==>    [2]:
    ==>       -1.414213562373095
    ==> [2]:
    ==>    [1]:
    ==>       -1
    ==>    [2]:
    ==>       3
    ==> [3]:
    ==>    [1]:
    ==>       1
    ==>    [2]:
    ==>       -3
    ==> [4]:
    ==>    [1]:
    ==>       2.82842712474619
    ==>    [2]:
    ==>       1.414213562373095

User manual for Singular version 4-0-2, 2015, generated by texi2html.