Question: randpoly problem

Hi all I am attempting to use the randpoly feature to generate a random polynomial of 1st degree with non-zero coeffs between -2 and 2.

I have tried the following:

factor1 := randpoly(x, dense, degree = 1, coeffs = rand(-2 .. 2))

unfortunately as you will find quite often this produces the polynomial "0".  Which it is very clear this is not wanted.

 

Any ideas would be appreciated.

 

Thanks,

Mark

Please Wait...