FastPolyEval  1.0
Fast Evaluation of Real and Complex Polynomials
apps.h
Go to the documentation of this file.
1 //
2 // apps.h
3 //
4 // Authors: Nicolae Mihalache & François Vigneron
5 //
6 // This software is released under BSD licence, with an attribution clause (see Licence file).
7 // Please cite the reference below if you use or distribute this software.
8 //
9 // • [1] R. Anton, N. Mihalache & F. Vigneron. Fast evaluation of real and complex polynomials. 2022.
10 // https://hal.archives-ouvertes.fr/hal-03820369
11 //
12 // Copyright 2022 Univ. Paris-Est Créteil & Univ. de Reims Champagne-Ardenne.
13 //
14 
20 #ifndef apps_h
21 #define apps_h
22 
23 #include <stdio.h>
24 
25 #include "array.h"
26 
35 array app_join(long prec, array z1, array z2);
36 
44 array app_grid(long prec, array z1, array z2);
45 
52 array app_exp(long prec, array z);
53 
60 array app_rot(long prec, array z);
61 
68 array app_polar(long prec, array z);
69 
78 array app_unif(long prec, ulong n, mpfr_t st, mpfr_t en);
79 
88 array app_rand(long prec, ulong n, mpfr_t st, mpfr_t en);
89 
98 array app_normal(long prec, ulong n, mpfr_t cent, mpfr_t var);
99 
106 array app_sphere(long prec, ulong n);
107 
116 bool app_compare(long prec, array z1, array z2, char *output);
117 
124 array app_re(long prec, array z);
125 
132 array app_im(long prec, array z);
133 
140 array app_conj(long prec, array z);
141 
149 array app_tensor(long prec, array z1, array z2);
150 
164 bool app_eval_p(long prec, poly P, array z, char *outFile, char *outError,
165  long count, char *outHorner, long countHorner, const char **inFiles);
166 
180 bool app_eval_d(long prec, poly P, array z, char *outFile, char *outError,
181  long count, char *outHorner, long countHorner, const char **inFiles);
182 
196 bool app_eval_n(long prec, poly P, array z, char *outFile, char *outError,
197  long count, char *outHorner, long countHorner, const char **inFiles);
198 
217 bool app_eval_r(long prec, poly P, array z, ulong maxIter, char *outFile, char *outError,
218  long count, char *outHorner, long countHorner, const char **inFiles);
219 
232 bool app_analyse(long prec, poly P, char *outFile, char *outChange);
233 
234 #endif /* apps_h */
array app_sphere(long prec, ulong n)
Returns a list of n compelx numbers, uniformly distributed on the Riemann sphere.
array app_join(long prec, array z1, array z2)
Joins the real parts of the sequences z1 and z2 as the real parts and imaginary parts of a new list.
array app_re(long prec, array z)
Returns the real parts of the numbers in the sequence z.
bool app_compare(long prec, array z1, array z2, char *output)
Compares two list of complex values and reports the eventual errors.
array app_rot(long prec, array z)
Computes a*exp(ib) for each term a+ib of a sequence z of complex numbers.
bool app_analyse(long prec, poly P, char *outFile, char *outChange)
Analyses the polynomail P and outputs its concave cover, ignored coefficients and (optionally) the mo...
array app_im(long prec, array z)
Returns the imaginary parts of the numbers in the sequence z.
array app_unif(long prec, ulong n, mpfr_t st, mpfr_t en)
Returns the list of n real numbers that split the interval [st,en] in n-1 equal intervals.
array app_polar(long prec, array z)
Computes the complex numbers given by a sequence z of their polar coordinates on the sphere.
array app_rand(long prec, ulong n, mpfr_t st, mpfr_t en)
Returns the list of n random real numbers in the interval [st,en], uniformly distributed.
array app_exp(long prec, array z)
Computes the complex exponential of a sequence z.
bool app_eval_d(long prec, poly P, array 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.
array app_normal(long prec, ulong n, mpfr_t cent, mpfr_t var)
Returns the list of n random real numbers, normally distributed with center cent and variance var.
array app_tensor(long prec, array z1, array z2)
Computes tensor (or piontwise) product of the sequences z1 and z2.
array app_conj(long prec, array z)
Returns the conjugates of the numbers in the sequence z.
bool app_eval_r(long prec, poly P, array 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 algorith...
bool app_eval_n(long prec, poly P, array 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.
array app_grid(long prec, array z1, array z2)
Computes the set product of the real parts of two sequences z1 and z2.
bool app_eval_p(long prec, poly P, array 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.
Definition of a variable length array of arbitary precision complex numbers that are based on mpfr.
uint64_t ulong
ulong is uint64
Definition: ntypes.h:37
A variable length array of machine floating point complex numbers.
Definition: array.h:37
Polynomial with multi-precision floating point complex coefficients.
Definition: poly.h:31