![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of complex polynomials with machine floating point coefficients. More...
Go to the source code of this file.
Data Structures | |
| struct | polyf_struct |
| Polynomial with machine floating point complex coefficients. More... | |
Typedefs | |
| typedef polyf_struct | polyf_t[1] |
Practical wrapper for polyf_struct. More... | |
| typedef polyf_struct * | polyf |
Convenience pointer to polyf_struct. | |
Functions | |
| polyf | polyf_new (deg_t degree) |
Returns a new complex polynomial of given degree, with machine floating point coefficients. More... | |
| 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 coefficients. More... | |
| bool | polyf_free (polyf P) |
Frees all the memory used by the polynomial P, assuming the struct has been allocated with malloc(), for example with polyr_new(). More... | |
| bool | polyf_set (polyf P, compf coeff, deg_t ind) |
Sets the coefficient of the polynomial P corresponding to the power ind to coeff. More... | |
| bool | polyf_eval (compf res, polyf P, compf z) |
Evaluates P(z) using Horner's method. More... | |
| bool | polyf_eval_r (compf res, polyf P, coeff_t x) |
Evaluates P(x) using Horner's method. More... | |
| polyf | polyf_derivative (polyf P) |
Computes the derivative of P. More... | |
| polyf | polyf_sum (polyf P, polyf Q) |
Computes P+Q. More... | |
| polyf | polyf_diff (polyf P, polyf Q) |
Computes P-Q. More... | |
| polyf | polyf_prod (polyf P, polyf Q) |
Computes P*Q. More... | |
| polyf | polyf_sqr (polyf P) |
Computes the square of P. More... | |
Definition of complex polynomials with machine floating point coefficients.
Definition in file polyf.h.
| typedef polyf_struct polyf_t[1] |
Practical wrapper for polyf_struct.
To avoid the constant use * and & the type polyf_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 polyr_new().
| P | the polynomial |
Returns a new complex polynomial given the list of its roots, with machine floating point coefficients.
| roots | the roots of the polynomial |
| degree | the degree of the polynomial |
NULL if some error occurred. Returns a new complex polynomial of given degree, with machine floating point coefficients.
| degree | the degree of the polynomial |
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.