acb_poly – polynomials over complex numbers¶

class
flint.
acb_poly
(val=None)¶ 
coeffs
(self)¶

degree
(self) → long¶

derivative
(self)¶

evaluate
(self, xs, algorithm='fast')¶ Multipoint evaluation: evaluates self at the list of points xs. The algorithm can be ‘iter’ or ‘fast’. The ‘fast’ algorithm is asymptotically fast, but has worse numerical stability.
Note: for ordinary singlepoint evaluation, just call the polynomial with the point as the argument.

from_roots
(type cls, roots)¶ Constructs the monic polynomial whose roots are the given complex numbers.
>>> acb_poly.from_roots(range(4)) 1.00000000000000*x^4 + (6.00000000000000)*x^3 + 11.0000000000000*x^2 + (6.00000000000000)*x

integral
(self)¶

interpolate
(type cls, xs, ys, algorithm='fast')¶ Constructs the unique interpolating polynomial of length at most n taking the values ys when evaluated at the n distinct points xs. Algorithm can be ‘newton’, ‘barycentric’ or ‘fast’. The ‘fast’ algorithm is asymptotically fast, but has worse numerical stability.

length
(self) → long¶

repr
(self)¶

root_bound
(self)¶ Returns an upper bound for the absolute value of the roots of self.

roots
(s, tol=None, maxprec=None)¶ Attempts to isolate all the complex roots of s. If tol is specified, the roots are further refined to at least the requested tolerance. The input polynomial must be squarefree and sufficiently accurate. Raises an exception if unsuccessful.
>>> for c in acb_poly.from_roots([1,2,3,4,5]).roots(1e10): print(c) ... [1.00000000000000 +/ 7.71e18] + [+/ 7.59e18]j [2.00000000000000 +/ 1.18e16] + [+/ 1.16e16]j [3.00000000000000 +/ 4.24e16] + [+/ 4.22e16]j [4.00000000000000 +/ 7.21e16] + [+/ 7.00e16]j [5.00000000000000 +/ 2.41e16] + [+/ 2.24e16]j >>> for c in acb_poly.from_roots([1,2,2,4,5]).roots(1e10): print(c) ... Traceback (most recent call last): ... ValueError: roots() failed to converge: insufficient precision, or squareful input

str
(self, bool ascending=False)¶ Convert to a humanreadable string (generic implementation for all polynomial types).
If ascending is True, the monomials are output from low degree to high, otherwise from high to low.

unique_fmpz_poly
(self)¶
