Slug #1826
ApproxSolve: size of numerators/denominators
Description
ApproxSolve
uses a form of the shape lemma to find real solutions to polynomial systems.
This means that one minpoly is computed, along with its real roots. Then the other coordinates
are then obtained by evaluation of polynomials of the form y - f(z)
and x - g(z)
The evaluation usually produces rationals with excessively large numer/denom.
Improve this!
History
#1 Updated by John Abbott 24 days ago
- Tracker changed from Bug to Slug
Here is some old code I found lying around which illustrates the effect:
//use P ::= ZZ/(32003)[x,y,z]; use P ::= QQ[x,y,z]; DEG := 3; X := indets(P); S := support((1+sum(X))^DEG); define rndpoly(S) return sum([random(-99,99)*t | t in S]); enddefine; -- rndpoly L := [rndpoly(S) | i in 1..NumIndets(P)]; indent(L); I := ideal(L); //SetVerbosityLevel(100); println "======================================================="; println "ReducedGBasis"; println "======================================================="; t0 := CpuTime(); RGB := ReducedGBasis(I); println "RGB TIME ", TimeFrom(t0); println; println; J := ideal(L); println "======================================================="; println "MinPolyQuot"; println "======================================================="; t0 := CpuTime(); mu := MinPolyQuot(x,J,x); println "MPQ TIME ", TimeFrom(t0); println; println; if characteristic(CurrentRing) = 0 then println "======================================================="; println "ApproxSolve"; println "======================================================="; t0:=CpuTime(); solns:=ApproxSolve(L); println "ApproxSolve TIME ", TimeFrom(t0); println; println; endif; println "======================================================="; println "RationalSolve"; println "======================================================="; t0 := CpuTime(); RationalSolve(L); println "RatSolve TIME ", TimeFrom(t0); println; println;
Look at the sizes of the numer/denom in solns.AffinePts