function [y4,s] = check_roots(p,q,r)
%p = -8; q = 4; r = 300;
x = linspace(-8,8,101);
y = r + x.*(4*q + x.*(6*p + x.^2));
z = -q^2/4 + x.*((9*p^2-r)/4 + x.*(3*p + x));
%plot(x,y)
y4=eval(solve('r + x*(4*q + x*(6*p + x^2))=0','x'));
z3=eval(solve('-q^2/4 + x*((9*p^2-r)/4 + x*(3*p + x))=0','x'));
sig =  -sign(q)*sqrt(z3);
s(1)  = sig(1) + sig(2) + sig(3);
s(2)  = sig(1) - sig(2) - sig(3);
s(3)  =-sig(1) + sig(2) - sig(3);
s(4)  =-sig(1) - sig(2) + sig(3);
