@public
def nroots(f, n=15, maxsteps=50, cleanup=True):
 try:
  F = Poly(f, greedy=False)
 except GeneratorsNeeded:
  raise PolynomialError(("can't compute numerical roots of %s, not a polynomial" % f))
 return F.nroots(n=n, maxsteps=maxsteps, cleanup=cleanup)

@ public def nroots ( f , n = 15 , maxsteps = 50 , cleanup = True ) : try : F = Poly ( f , greedy = False ) except GeneratorsNeeded : raise PolynomialError ( ( "can't compute numerical roots of %s, not a polynomial" % f ) ) return F . nroots ( n = n , maxsteps = maxsteps , cleanup = cleanup )
compute numerical approximations of roots of f .