next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
PHCpack :: refineSolutions

refineSolutions -- refines solutions of a system by increasing working precision (invokes "phc -v")

Synopsis

Description

The user can specify the number of decimal places desired to refine solutions. A simple example of when to use this function: suppowe we would like to decide if some of the solutions are really close to zero. Let us compute a square root with a working precision of 64 decimal places:
i1 : R = QQ[x,y]; S = {x^2 - 1/3, x*y - 1}; roots = phcSolve(S);
using temporary files /tmp/M2-5203-1PHCinput and /tmp/M2-5203-1PHCoutput
i4 : r0 = roots#0#Coordinates#1

o4 = 1.73205080756888

o4 : CC (of precision 53)
i5 : newRoots = refineSolutions(S,roots,64)
using temporary file /tmp/M2-5203-3PHCoutput for storing refined solutions 

o5 = {{.57735, 1.73205}, {-.57735, -1.73205}}

o5 : List
i6 : newRoots#0 -- recall that solutions are of type Point

o6 = {.57735, 1.73205}

o6 : Point
i7 : r1 = newRoots#0#Coordinates#1

o7 = 1.73205080756887729352744634150587236694280525381038062805580698

o7 : CC (of precision 213)

Ways to use refineSolutions :