FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of real polynomials with machine floating point coefficients. More...
Go to the source code of this file.
Data Structures | |
struct | polyfr_struct |
Polynomial with machine floating point real coefficients. More... | |
Typedefs | |
typedef polyfr_struct | polyfr_t[1] |
Practical wrapper for polyfr_struct . More... | |
typedef polyfr_struct * | polyfr |
Convenience pointer to polyfr_struct . | |
Functions | |
polyfr | polyfr_new (deg_t degree) |
Returns a new real polynomial of given degree , with machine floating point coefficients. More... | |
bool | polyfr_free (polyfr P) |
Frees all the memory used by the polynomial P , assuming the struct has been allocated with malloc() , for example with polyfr_new() . More... | |
bool | polyfr_set (polyfr P, coeff_t coeff, deg_t ind) |
Sets the coefficient corresponding to the power ind to coeff . More... | |
coeff_t | polyfr_get (polyfr P, deg_t ind) |
Returns the coefficient corresponding to the power ind . More... | |
bool | polyfr_eval_c (compf res, polyfr P, compf z) |
Evaluates P(z) using Horner's method. More... | |
coeff_t | polyfr_eval (polyfr P, coeff_t x) |
Evaluates P(x) using Horner's method. More... | |
polyf | polyfr_comp (polyfr P) |
Return a complex version of the real polynomial P . More... | |
polyfr | polyfr_derivative (polyfr P) |
Computes the derivative of P . More... | |
polyfr | polyfr_sum (polyfr P, polyfr Q) |
Computes P+Q . More... | |
polyfr | polyfr_diff (polyfr P, polyfr Q) |
Computes P-Q . More... | |
polyfr | polyfr_prod (polyfr P, polyfr Q) |
Computes P*Q . More... | |
polyfr | polyfr_sqr (polyfr P) |
Computes the square of P . More... | |
polyfr | polyf_hyp (int n) |
Computes the n-th hyperbolic polynomial, the n-th image of 0 under the iteration of z->z^2+c . It is a polynomial of degree 2^{n-1} in c . More... | |
polyfr | polyf_cheb (int n) |
Computes the Chebyshev polynomial of degree n . More... | |
polyfr | polyf_leg (int n) |
Computes the Legendre polynomial of degree n . More... | |
polyfr | polyf_her (int n) |
Computes the Hermite polynomial of degree n . More... | |
polyfr | polyf_lag (int n) |
Computes the Laguerre polynomial of degree n . More... | |
Definition of real polynomials with machine floating point coefficients.
Definition in file polyfr.h.
typedef polyfr_struct polyfr_t[1] |
Practical wrapper for polyfr_struct
.
To avoid the constant use *
and &
the type polyfr_t
is a pointer.
polyfr polyf_cheb | ( | int | n | ) |
Computes the Chebyshev polynomial of degree n
.
n | the degree of the polynomial |
NULL
if some error occurred. polyfr polyf_her | ( | int | n | ) |
Computes the Hermite polynomial of degree n
.
n | the degree of the polynomial |
NULL
if some error occurred. polyfr polyf_hyp | ( | int | n | ) |
Computes the n-th
hyperbolic polynomial, the n-th
image of 0
under the iteration of z->z^2+c
. It is a polynomial of degree 2^{n-1}
in c
.
n | the order of the polynomial |
NULL
if some error occurred. polyfr polyf_lag | ( | int | n | ) |
Computes the Laguerre polynomial of degree n
.
n | the degree of the polynomial |
NULL
if some error occurred. polyfr polyf_leg | ( | int | n | ) |
Computes the Legendre polynomial of degree n
.
n | the degree of the polynomial |
NULL
if some error occurred. Return a complex version of the real polynomial P
.
P | a polynomial |
NULL
if some error occurred. 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. Evaluates P(x)
using Horner's method.
P | the polynomial |
x | the argument |
NaN
if some error occurred. Frees all the memory used by the polynomial P
, assuming the struct has been allocated with malloc()
, for example with polyfr_new()
.
P | the polynomial |
Returns the coefficient corresponding to the power ind
.
P | the polynomial |
ind | the index |
ind
. Returns a new real 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.