FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of a buffer for pre-computed powers of a complex number with arbitary precision. More...
Go to the source code of this file.
Data Structures | |
struct | pows_struct |
The powers of the complex number z using multi-precision floating point numbers. More... | |
Typedefs | |
typedef pows_struct | pows_t[1] |
Practical wrapper for pows_struct . More... | |
typedef pows_struct * | pows |
Convenience pointer to eval_struct . | |
Functions | |
pows | pows_new (prec_t prec, deg_t size) |
Returns a new buffer of powers of complex numbers of precision prec , with initial storage space for size powers. More... | |
bool | pows_free (pows zn) |
Frees all the memory used by the buffer zn , assuming the struct has been allocated with malloc() , for example with pows_new() . More... | |
bool | pows_set (pows zn, comp z) |
Sets the complex number of which the powers will be computed by the buffer zn . More... | |
comp_ptr | pows_pow (pows zn, deg_t pow) |
Computes z^pow using repeated squares method and the cache of previously computed powers. More... | |
comp_ptr | pows_pow_once (pows zn, deg_t pow) |
Computes z^pow using repeated squares method and the cache of previously computed powers. More... | |
Definition of a buffer for pre-computed powers of a complex number with arbitary precision.
Definition in file pows.h.
typedef pows_struct pows_t[1] |
Practical wrapper for pows_struct
.
To avoid the constant use *
and &
the type pows_t
is a pointer.
Frees all the memory used by the buffer zn
, assuming the struct has been allocated with malloc()
, for example with pows_new()
.
zn | the powers buffer |
Returns a new buffer of powers of complex numbers of precision prec
, with initial storage space for size
powers.
prec
must be at least precf
and size
at most MAX_DEG
.prec | the precision of the coefficients, in bits |
size | the size of the buffer |
NULL
if some error occurred. Computes z^pow
using repeated squares method and the cache of previously computed powers.
It caches intermediary powers of z
that have been computed to accelerate later calls of this function. Also, if pow
is larger than the size of the buffer zn
, it is automatically increased to store the result.
zn | the powers buffer |
pow | the power to compute |
z^pow
, NULL
if some error occurred. Computes z^pow
using repeated squares method and the cache of previously computed powers.
It does NOT cache intermediary powers of z
into zn
.
zn | the powers buffer |
pow | the power to compute |
z^pow
, NULL
if some error occurred.