FastPolyEval  1.0
Fast Evaluation of Real and Complex Polynomials
concave.h
Go to the documentation of this file.
1 //
2 // concave.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 
22 #ifndef concave_h
23 #define concave_h
24 
25 #include "ntypes.h"
26 #include "list.h"
27 
28 // MARK: data types
29 
31 #define BITS_GUARD 6
32 
35 typedef struct {
44 
47 
48 // MARK: macros & functions prototypes
49 
59 
67 
80 
93 
94 #endif /* conc_h */
concave conc_new(list l, prec_t prec)
Computes the concave cover of the graph of a list l sorted in decreasing order.
concave_struct * concave
Convenience pointer to concave_struct.
Definition: concave.h:46
bool conc_range_der(concave f, real_t la)
Computes the range of indexes in f->allPow to use for evaluating the derivative of the original polyn...
bool conc_range(concave f, real_t la)
Computes the range of indexes in f->allPow to use for evaluating the original polynomial at z with la...
bool conc_free(concave f)
Frees all the memory used by the concave map f, assuming the struct has been allocated with malloc(),...
Definition of a list that can quickly sort real machine floating-point numbers and keep track of thei...
list_struct list_t[1]
Practical wrapper for list_struct.
Definition: list.h:46
Definition of basic types.
double real_t
The machine number type to use for polynomial analysis and preconditionning.
Definition: ntypes.h:163
ulong deg_t
The integer number type to use for polynomial degrees and indexes.
Definition: ntypes.h:128
ulong prec_t
The integer number type to use for polynomial degrees and indexes.
Definition: ntypes.h:188
Description of a concave function computed from the coefficients of some polynomial.
Definition: concave.h:35
list_t def
the definition of the concave map
Definition: concave.h:38
deg_t mid
the position in allPow of the power which gives the maximum modulus
Definition: concave.h:41
prec_t prec
the precision that will be used to evaluate the polynomial, excluding extraBits
Definition: concave.h:37
deg_t end
the position in allPow of the least power to evaluate (for given slope)
Definition: concave.h:42
prec_t extraBits
extra bits for guarding, depending on the degree of the polynomial
Definition: concave.h:36
list_t all
all terms of the polynomial that may be used for evaluation
Definition: concave.h:39
deg_t start
the position in allPow of the largest power to evaluate (for given slope)
Definition: concave.h:40
A list of real numbers that can be sorted, while keeping track of original order.
Definition: list.h:35