![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
The implementation of the mini-apps with machine numbers. More...
Go to the source code of this file.
Functions | |
arrayf | appf_join (arrayf z1, arrayf z2) |
Joins the real parts of the sequences z1 and z2 as the real parts and imaginary parts of a new list. More... | |
arrayf | appf_grid (arrayf z1, arrayf z2) |
Computes the set product of the real parts of two sequences z1 and z2 . More... | |
arrayf | appf_exp (arrayf z) |
Computes the complex exponential of a sequence z . More... | |
arrayf | appf_rot (arrayf z) |
Computes a*exp (ib) for each term a+ib of a sequence z of complex numbers. More... | |
arrayf | appf_polar (arrayf z) |
Computes the complex numbers given by a sequence z of their polar coordinates on the sphere. More... | |
arrayf | appf_unif (ulong n, coeff_t st, coeff_t en) |
Returns the list of n real numbers that split the interval [st,en] in n-1 equal intervals. More... | |
bool | appf_compare (arrayf z1, arrayf z2, char *output) |
Compares two list of complex values and reports the eventual errors. More... | |
arrayf | appf_re (arrayf z) |
Returns the real parts of the numbers in the sequence z . More... | |
arrayf | appf_im (arrayf z) |
Returns the imaginary parts of the numbers in the sequence z . More... | |
arrayf | appf_conj (arrayf z) |
Returns the conjugates of the numbers in the sequence z . More... | |
arrayf | appf_tensor (arrayf z1, arrayf z2) |
Computes tensor (or piontwise) product of the sequences z1 and z2 . More... | |
bool | appf_eval_p (polyf P, arrayf z, char *outFile, char *outError, long count, char *outHorner, long countHorner, const char **inFiles) |
Evaluates the polynomial P in all points in the list z , using the FPE algorithm. More... | |
bool | appf_eval_d (polyf P, arrayf z, char *outFile, char *outError, long count, char *outHorner, long countHorner, const char **inFiles) |
Evaluates the derivative of the polynomial P in all points in the list z , using the FPE algorithm. More... | |
bool | appf_eval_n (polyf P, arrayf z, char *outFile, char *outError, long count, char *outHorner, long countHorner, const char **inFiles) |
Evaluates the Newton terms of the polynomial P in all points in the list z , using the FPE algorithm. More... | |
bool | appf_eval_r (polyf P, arrayf z, ulong maxIter, char *outFile, char *outError, long count, char *outHorner, long countHorner, const char **inFiles) |
Evaluates the Newton iterates of the polynomial P in all points in the list z , using the FPE algorithm. More... | |
The implementation of the mini-apps with machine numbers.
Definition in file appsf.h.
Returns the conjugates of the numbers in the sequence z
.
z | the list of points |
z
, NULL
if some error occurred. bool appf_eval_d | ( | polyf | P, |
arrayf | z, | ||
char * | outFile, | ||
char * | outError, | ||
long | count, | ||
char * | outHorner, | ||
long | countHorner, | ||
const char ** | inFiles | ||
) |
Evaluates the derivative of the polynomial P
in all points in the list z
, using the FPE algorithm.
P | the polynomial |
z | the list of evaluation points |
outFile | the results output file name |
outError | the errors list file name |
count | the number of repetitions of the computing task |
outHorner | the results output file name, computed by Horner's method |
countHorner | the number of repetitions of the computing task by Horner's method |
inFiles | a vector with the names of input files, for printing stats only |
bool appf_eval_n | ( | polyf | P, |
arrayf | z, | ||
char * | outFile, | ||
char * | outError, | ||
long | count, | ||
char * | outHorner, | ||
long | countHorner, | ||
const char ** | inFiles | ||
) |
Evaluates the Newton terms of the polynomial P
in all points in the list z
, using the FPE algorithm.
P | the polynomial |
z | the list of evaluation points |
outFile | the results output file name |
outError | the errors list file name |
count | the number of repetitions of the computing task |
outHorner | the results output file name, computed by Horner's method |
countHorner | the number of repetitions of the computing task by Horner's method |
inFiles | a vector with the names of input files, for printing stats only |
bool appf_eval_p | ( | polyf | P, |
arrayf | z, | ||
char * | outFile, | ||
char * | outError, | ||
long | count, | ||
char * | outHorner, | ||
long | countHorner, | ||
const char ** | inFiles | ||
) |
Evaluates the polynomial P
in all points in the list z
, using the FPE algorithm.
P | the polynomial |
z | the list of evaluation points |
outFile | the results output file name |
outError | the errors list file name |
count | the number of repetitions of the computing task |
outHorner | the results output file name, computed by Horner's method |
countHorner | the number of repetitions of the computing task by Horner's method |
inFiles | a vector with the names of input files, for printing stats only |
bool appf_eval_r | ( | polyf | P, |
arrayf | z, | ||
ulong | maxIter, | ||
char * | outFile, | ||
char * | outError, | ||
long | count, | ||
char * | outHorner, | ||
long | countHorner, | ||
const char ** | inFiles | ||
) |
Evaluates the Newton iterates of the polynomial P
in all points in the list z
, using the FPE algorithm.
This is a method to approximate the roots of P
, but there are no guarantees for the convergence. If the iterates escape far from the origin, the alogrith stops (for those starting points).
P | the polynomial |
z | the list of evaluation points |
maxIter | the maximum iterates for each starting point |
outFile | the results output file name |
outError | the errors list file name |
count | the number of repetitions of the computing task |
outHorner | the results output file name, computed by Horner's method |
countHorner | the number of repetitions of the computing task by Horner's method |
inFiles | a vector with the names of input files, for printing stats only |
Computes the complex exponential of a sequence z
.
z | the list of points |
NULL
if some error occurred. Computes the set product of the real parts of two sequences z1
and z2
.
z1 | the first list |
z2 | the second list |
NULL
if some error occurred. Returns the imaginary parts of the numbers in the sequence z
.
z | the list of points |
z
, NULL
if some error occurred. Joins the real parts of the sequences z1
and z2
as the real parts and imaginary parts of a new list.
z1 | the first list |
z2 | the second list |
NULL
if some error occurred. Computes the complex numbers given by a sequence z
of their polar coordinates on the sphere.
z | the list of polar coordinates |
NULL
if some error occurred. Returns the real parts of the numbers in the sequence z
.
z | the list of points |
z
, NULL
if some error occurred. Computes a*exp
(ib) for each term a+ib
of a sequence z
of complex numbers.
z | the list of points |
a+ib->a*exp
(ib), NULL
if some error occurred. Computes tensor (or piontwise) product of the sequences z1
and z2
.
z1 | the first list |
z2 | the second list |
NULL
if some error occurred. Returns the list of n
real numbers that split the interval [st,en] in
n-1
equal intervals.
n | the number of points, at least 2 |
st | the start point |
en | the end point |
NULL
if some error occurred.