% Testing rlcad
% Condition on quartic polynomial being positive semidefinite.

rlset reals;


{}


quartic := all(x,x**4+p*x**2+q*x+r>=0)$


quarticneg := not quartic$



rlqepcad quarticneg;


             4        3  2        2  2          2         4        3
r < 0 or 16*p *r - 4*p *q  - 128*p *r  + 144*p*q *r - 27*q  + 256*r  < 0

         3        2  2         2       2                     2
 or (16*p *r - 3*p *q  - 64*p*r  + 36*q *r < 0 and 16*p*r - q  < 0)


end;

Tested on alfred running Linux 4.4.38.1.amd64-smp x86_64 CSL
Time (counter 1): 40 ms  plus GC time: 30 ms
1: real 2.05
user 1.73
sys 0.22
