# isCoordinateZero -- checks if coordinate has absolute value less than a given tolerance

## Synopsis

• Usage:
isCoordinateZero(sol,k,tol)
• Inputs:
• sol, , solution to a polynomial system
• k, an integer, index of coordinate
• tol, , tolerance on the absolute value of the k-th coordinate
• Outputs:
• , true if the k-th coordinate of solution has absolute value less than tol, false otherwise

## Description

A solution has a zero k-th coordinate when the abs function evaluates to a number less than the given tolerance.

 i1 : R = CC[x,y]; i2 : f = { x^3*y^5 + y^2 + x^2*y, x*y + x^2 - 1}; i3 : fSols = solveSystem(f, randomSeed=>3); i4 : fSols/print {-1, 0} {1, 0} {-1.59272, .964857} {.742585+.425943*ii, .270685-1.00715*ii} {-.764107, -.544612} {1.33076-.335184*ii, -.62414+.513163*ii} {-.894935-.624334*ii, .143333+1.14868*ii} {1.33076+.335184*ii, -.62414-.513163*ii} {-.894935+.624334*ii, .143333-1.14868*ii} {.742585-.425943*ii, .270685+1.00715*ii} o4 = {, , , , , , , , , } o4 : List i5 : isCoordinateZero(fSols_0,1,1.0e-10) o5 = true

Good values for the tolerance are relative to the accuracy and the condition number of the solution. To improve the accuracy of a solution, apply refineSolutions with a higher working precision.