Definition of machine complex numbers.
compf_struct compf[1]
Practical wrapper for compf_struct.
Definition of basic types.
double coeff_t
The machine number type to use for polynomial coefficients and evaluation.
ulong deg_t
The integer number type to use for polynomial degrees and indexes.
polyf_struct polyf_t[1]
Practical wrapper for polyf_struct.
polyf polyf_diff(polyf P, polyf Q)
Computes P-Q.
bool polyf_eval_r(compf res, polyf P, coeff_t x)
Evaluates P(x) using Horner's method.
bool polyf_set(polyf P, compf coeff, deg_t ind)
Sets the coefficient of the polynomial P corresponding to the power ind to coeff.
polyf polyf_new(deg_t degree)
Returns a new complex polynomial of given degree, with machine floating point coefficients.
bool polyf_free(polyf P)
Frees all the memory used by the polynomial P, assuming the struct has been allocated with malloc(),...
polyf_struct * polyf
Convenience pointer to polyf_struct.
polyf polyf_from_roots(compf_ptr roots, deg_t degree)
Returns a new complex polynomial given the list of its roots, with machine floating point coefficient...
polyf polyf_sqr(polyf P)
Computes the square of P.
polyf polyf_prod(polyf P, polyf Q)
Computes P*Q.
polyf polyf_derivative(polyf P)
Computes the derivative of P.
polyf polyf_sum(polyf P, polyf Q)
Computes P+Q.
bool polyf_eval(compf res, polyf P, compf z)
Evaluates P(z) using Horner's method.
Polynomial with machine floating point complex coefficients.
bool modified
the status of the coefficients
compf_ptr a
the coefficients
deg_t degree
the degree of the polynomial