![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of complex polynomials with arbitary precision coefficients. More...
Go to the source code of this file.
Data Structures | |
| struct | poly_struct |
| Polynomial with multi-precision floating point complex coefficients. More... | |
Typedefs | |
| typedef poly_struct | poly_t[1] |
Practical wrapper for poly_struct. More... | |
| typedef poly_struct * | poly |
Convenience pointer to poly_struct. | |
Functions | |
| poly | poly_new (deg_t degree, prec_t prec) |
Returns a new complex polynomial of given degree, with coefficients of precision prec. More... | |
| poly | poly_from_roots (comp_ptr roots, deg_t degree, prec_t prec) |
Returns a new complex polynomial given the list of its roots, with coefficients of precision prec. More... | |
| bool | poly_free (poly P) |
Frees all the memory used by the polynomial P, assuming the struct has been allocated with malloc(), for example with poly_new(). More... | |
| bool | poly_set (poly P, comp coeff, deg_t ind) |
Sets the coefficient of the polynomial P corresponding to the power ind to coeff. More... | |
| bool | poly_eval (comp res, poly P, comp z) |
Evaluates P(z) using Horner's method. More... | |
| bool | poly_eval_r (comp res, poly P, mpfr_t x) |
Evaluates P(x) using Horner's method. More... | |
| poly | poly_derivative (poly P) |
Computes the derivative of P. More... | |
| poly | poly_sum (poly P, poly Q) |
Computes P+Q. More... | |
| poly | poly_diff (poly P, poly Q) |
Computes P-Q. More... | |
| poly | poly_prod (poly P, poly Q) |
Computes P*Q. More... | |
| poly | poly_sqr (poly P) |
Computes the square of P. More... | |
Definition of complex polynomials with arbitary precision coefficients.
Definition in file poly.h.
| typedef poly_struct poly_t[1] |
Practical wrapper for poly_struct.
To avoid the constant use * and & the type poly_t is a pointer.
Computes the derivative of P.
| P | the polynomial |
NULL if some error occurred. Computes P-Q.
| P | a polynomial |
| Q | another polynomial |
NULL if some error occurred. Frees all the memory used by the polynomial P, assuming the struct has been allocated with malloc(), for example with poly_new().
| P | the polynomial |
Returns a new complex polynomial given the list of its roots, with coefficients of precision prec.
prec must be at least precf | roots | the roots of the polynomial |
| degree | the degree of the polynomial |
| prec | the precision of the coefficients, in bits |
NULL if some error occurred. Returns a new complex polynomial of given degree, with coefficients of precision prec.
prec must be at least precf | degree | the degree of the polynomial |
| prec | the precision of the coefficients, in bits |
NULL if the degree is larger than MAX_DEG. Computes P*Q.
| P | a polynomial |
| Q | another polynomial |
NULL if some error occurred. Computes the square of P.
| P | the polynomial |
NULL if some error occurred.