Macaulay2 » Documentation
Packages » NAGtypes :: residual
next | previous | forward | backward | up | index | toc

residual -- residual of a polynomial function at a point

Synopsis

Description

Evaluates a PolySystem or a matrix with polynomial entries at a point and returns the norm of the result.

i1 : R = CC[x,y]; S = polySystem {x^2+y^2-5, 2*x^2-y};
i3 : p = point {{1.001-0.0001*ii,2.+0.0001*ii}};
i4 : evaluate(S,p)

o4 = | .00200098+.0001998ii |
     | .00400198-.0005004ii |

                2         1
o4 : Matrix CC    <-- CC
              53        53
i5 : residual(S,p)

o5 = .0045066711751354

o5 : RR (of precision 53)
i6 : residual(S,p,Norm=>3)

o6 = .0041933374041228

o6 : RR (of precision 53)
i7 : residual(S,p,Norm=>infinity)

o7 = .00403314320107731

o7 : RR (of precision 53)

See also

Ways to use residual :

For the programmer

The object residual is a method function with options.