working with realroots



   
Hello, people!
Sorry for disturbance and double post.
I forgot to put a description theme.
I got a question.
I need to use one of the found roots for calculation.
But when I use one of them g[2] to compare the program doesn't really do any comparison.
How to use the realroots for comparison?
I don't need g=-1. I need just? numerical -1.
Thank you for your attention.

w:realroots(g^2-1);
w[1];
if (w[2]<2) then j:0;
j;?</span>

[g=-1,g=1]
g=-1
(%o330) if g=-1<2 then j:0 
(%o331) j?   ?