Sponsored links: Algebra eBooks
 

Related

rootsepsilon

? rootsepsilon;

Calculate

rootsepsilon

? rootsepsilon;

Calculate

rootsepsilon

Run Example
(%i1)? rootsepsilon;

 -- Option variable: rootsepsilon
     Default value: 1.0e-7

     `rootsepsilon' is the tolerance which establishes the confidence
     interval for the roots found by the `realroots' function.


(%o1)                                true
(%i2) 
Run Example
largestRoot(p) := rreduce(max, map(rhs, realroots(p)), minf);
(%o1)    largestRoot(p) := rreduce(max, map(rhs, realroots(p)), minf)
(%i2) polynomialInequalityHolds(psmall, pbig, var, thres) := (p: expand(pbig - psmall), if numberp(p) then p >
= 0 else ( deg: hipow(p,var), c: ratcoef(p,var,deg), root: largestRoot(p), c >
 0 and root <
 floor(thres)+1 + rootsepsilon));
(%o2) polynomialInequalityHolds(psmall, pbig, var, thres) := 
(p : expand(pbig - psmall), if numberp(p) then p >= 0
 else (deg : hipow(p, var), c : ratcoef(p, var, deg), root : largestRoot(p), 
(c > 0) and (root < floor(thres) + 1 + rootsepsilon)))
(%i3) polynomialInequalityHolds(9*18*n, 9*(18*n+72), n, 0);
(%o3)                              648 >= 0
(%i4) if 0 then 1 else 2;
(%o4)                         if 0 then 1 else 2
(%i5) 
Run Example
largestRoot(p) := rreduce(max, map(rhs, realroots(p)), minf);
(%o1)    largestRoot(p) := rreduce(max, map(rhs, realroots(p)), minf)
(%i2) polynomialInequalityHolds(psmall, pbig, var, thres) := (p: expand(pbig - psmall), if numberp(p) then p >
= 0 else ( deg: hipow(p,var), c: ratcoef(p,var,deg), root: largestRoot(p), c >
 0 and root <
 floor(thres)+1 + rootsepsilon));
(%o2) polynomialInequalityHolds(psmall, pbig, var, thres) := 
(p : expand(pbig - psmall), if numberp(p) then p >= 0
 else (deg : hipow(p, var), c : ratcoef(p, var, deg), root : largestRoot(p), 
(c > 0) and (root < floor(thres) + 1 + rootsepsilon)))
(%i3) polynomialInequalityHolds(9*18*n, 9*(18*n+72), n, 0);
(%o3)                              648 >= 0
(%i4) if 648 >
= 0 then 1 else 2;
(%o4)                                  1
(%i5) 

Related Help

Help for Rootsepsilon