|
D.7.8.9 allreal
Procedure from library rootsur.lib (see rootsur_lib).
- Usage:
- allreal(p);
- Return:
- int: 1 iff all the roots of p are real, 0 otherwise
Example:
| LIB "rootsur.lib";
ring r = 0,x,dp;
poly p = (x+2)*(x-1)*(x-5);
allreal(p);
==> 1
p = p*(x2+1);
allreal(p);
==> 0
| allrealst
|