Definition of machine complex numbers.
compf_struct compf[1]
Practical wrapper for compf_struct.
Definition of basic types.
ulong deg_t
The integer number type to use for polynomial degrees and indexes.
bool powsf_free(powsf zn)
Frees all the memory used by the buffer zn, assuming the struct has been allocated with malloc(),...
powsf powsf_new(deg_t size)
Returns a new buffer of powers of machine complex numbers, with initial storage space for size powers...
bool powsf_set(powsf zn, compf z)
Sets the complex number of which the powers will be computed by the buffer zn.
compf_ptr powsf_pow(powsf zn, deg_t pow)
Computes z^pow using repeated squares method and the cache of previously computed powers.
powsf_struct powsf_t[1]
Practical wrapper for powsf_struct.
powsf_struct * powsf
Convenience pointer to eval_struct.
compf_ptr powsf_pow_once(powsf zn, deg_t pow)
Computes z^pow using repeated squares method and the cache of previously computed powers.
The powers of the complex number z using machine floating point numbers.
compf res
a buffer for results
bool * computed
the status of powers
compf_ptr zn
the powers of z
deg_t size
the memory size allocated
byte tps
the largest non-negative integer such that 2^tps<=size