up previous next
 ApproxSolve

Approximate real solutions for polynomial system

 Syntax
 `ApproxSolve(L: LIST of RINGELEM): LIST of LIST of RAT`

 Description
This function returns the list of real solutions (points) of a 0-dimensional polynomial system L . The polynomials in L must have rational coefficients. Approximate coordinates are given for non-rational solutions.

Useful verbosity range 20--20.

 ```/**/ use QQ[x,y,z]; /**/ L := [x^3-y^2+z-1, x-2, (y-3)*(y+2)]; /**/ RationalSolve(L); [[2, -2, -3], [2, 3, 2]] /**/ ApproxSolve(L); [[2, -2, -3], [2, 3, 2]] /**/ L := [x^3-y^2+1, (y-3)*(y+2), z]; /**/ indent(ApproxSolve(L)); [ [167001090947516369641767378634802431634869700965461961120334511774287062707365/115792089237316195423570985008687907853269984665640564039457584007913129639936, -3105036184601417870297958976925005110513772034233393222278104076052101905372785086417905610616594068048936176388754598241094647389028646910227375835339689773298904914910878292075930186409206203488239052651022151060681311443956437155/1552518092300708935148979488462502555256886017116696611139052038026050952686376886330878408828646477950487730697131073206171580044114814391444287275041181139204454976020849905550265285631598444825262999193716468750892846853816057856, 0], [2, 3, 0] ] /**/ L := [x^3-y^2+z-1, x^2-2, (y-3)*(y+2)]; /**/ Pts := ApproxSolve(L); --> [[17564737135690137373... /**/ indent([[ DecimalStr(coord,10) | coord in pt] | pt in Pts]); [ ["1.4142135624", "-2.0000000000", "2.1715728753"], ["1.4142135624", "3.0000000000", "7.1715728753"], ["-1.4142135624", "-2.0000000000", "7.8284271247"], ["-1.4142135624", "3.0000000000", "12.8284271247"] ] -- Verify we have an approximate answer: /**/ indent([ [ FloatStr(eval(f, pt)) | f in L ] | pt in Pts]); [ ["-3.2567*10^(-76)", "-6.2932*10^(-77)", "2.3668*10^(-76)"], ["-1.3971*10^(-77)", "8.1808*10^(-78)", "2.5541*10^(-77)"], ["-3.7110*10^(-77)", "8.1808*10^(-78)", "2.5541*10^(-77)"], ["7.7208*10^(-77)", "3.2902*10^(-77)", "-1.2374*10^(-76)"] ] ```