![]() |
FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of a buffer for pre-computed powers of a real number with arbitary precision. More...
Go to the source code of this file.
Data Structures | |
| struct | powsr_struct |
The powers of the real number x using multi-precision floating point numbers. More... | |
Typedefs | |
| typedef powsr_struct | powsr_t[1] |
Practical wrapper for powsr_struct. More... | |
| typedef powsr_struct * | powsr |
Convenience pointer to eval_struct. | |
Functions | |
| powsr | powsr_new (prec_t prec, deg_t size) |
Returns a new buffer of powers of real numbers of precision prec, with initial storage space for size powers. More... | |
| bool | powsr_free (powsr xn) |
Frees all the memory used by the buffer xn, assuming the struct has been allocated with malloc(), for example with powsr_new(). More... | |
| bool | powsr_set (powsr xn, mpfr_t x) |
Sets the real number of which the powers will be computed by the buffer xn. More... | |
| mpfr_ptr | powsr_pow (powsr xn, deg_t pow) |
Computes x^pow using repeated squares method and the cache of previously computed powers. More... | |
| mpfr_ptr | powsr_pow_once (powsr xn, deg_t pow) |
Computes x^pow using repeated squares method and the cache of previously computed powers. More... | |
Definition of a buffer for pre-computed powers of a real number with arbitary precision.
Definition in file powsr.h.
| typedef powsr_struct powsr_t[1] |
Practical wrapper for powsr_struct.
To avoid the constant use * and & the type powsr_t is a pointer.
Frees all the memory used by the buffer xn, assuming the struct has been allocated with malloc(), for example with powsr_new().
| xn | the powers buffer |
Returns a new buffer of powers of real 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 | thessize of the buffer |
NULL if some error occurred. Computes x^pow using repeated squares method and the cache of previously computed powers.
It caches intermediary powers of x that have been computed to accelerate later calls of this function. Also, if pow is larger than the size of the buffer xn, it is automatically increased to store the result.
| xn | the powers buffer |
| pow | the power to compute |
x^pow, NULL if some error occurred. Computes x^pow using repeated squares method and the cache of previously computed powers.
It does NOT cache intermediary powers of x into xn.
| xn | the powers buffer |
| pow | the power to compute |
x^pow, NULL if some error occurred.