FastPolyEval
1.0
Fast Evaluation of Real and Complex Polynomials
|
Definition of MPFR complex numbers. More...
Go to the source code of this file.
Data Structures | |
struct | comp_struct |
Multi-precision floating point complex numbers. More... | |
Macros | |
#define | comp_init(d, prec) |
Allocates memory for the digits of d . More... | |
#define | comp_initz(d, prec) |
Allocates memory for the digits of d and sets its value to 0 . More... | |
#define | comp_clear(d) |
De-allocates the memory used by the digits of d . More... | |
#define | comp_zero(d) (mpfr_zero_p((d)->x) && mpfr_zero_p((d)->y)) |
Tests if d==0 . | |
#define | comp_add(d, a, b) |
Adds a to b and stores the result in d , all of type comp or comp_ptr. More... | |
#define | comp_set(d, a) |
Sets d to a . More... | |
#define | comp_setr(d, a) |
Sets d to the real value a . More... | |
#define | comp_neg(d, a) |
Sets d to -a . More... | |
#define | comp_addr(d, a, r) |
Adds the complex number a to the real number b and stores the result in d . More... | |
#define | comp_amu(d, a, r, buf) |
Adds the complex number a*r to d , where d ,a are complex and r is unsigned integer. More... | |
#define | comp_sub(d, a, b) |
Subtracts b from a and stores the result in d , all of type comp or comp_ptr. More... | |
#define | comp_subr(d, a, r) |
Subtracts the real number b from the complex number a and stores the result in d . More... | |
#define | comp_mul(d, a, b, buf1, buf2) |
Multiplies a to b and stores the result in d , all of type comp or comp_ptr. More... | |
#define | comp_div(d, a, b, b1, b2, b3) |
Divides a by b and stores the result in d , all of type comp or comp_ptr. More... | |
#define | comp_mod(m, a) mpfr_hypot((m), (a)->x, (a)->y, MPFR_RNDN); |
Computes the modulus of a and stores the result in m , a of type comp and m of type mpfr_t. | |
#define | comp_mulr(d, a, r) |
Multiplies the complex number a to the real number r and stores the result in d . More... | |
#define | comp_muli(d, a, i) |
Multiplies the complex number a to the integer i and stores the result in d . More... | |
#define | comp_mulu(d, a, i) |
Multiplies the complex number a to the unsigned integer i and stores the result in d . More... | |
#define | comp_sqr(d, a, buf) |
Squares a and stores the result in d , all of type comp or comp_ptr. More... | |
Typedefs | |
typedef comp_struct | comp[1] |
Practical wrapper for comp_struct . More... | |
typedef comp_struct * | comp_ptr |
Convenience pointer to comp_struct . | |
Functions | |
real_t | comp_log2 (comp z) |
Computes the base 2 log of |z| . More... | |
real_t | real_log2 (mpfr_t x) |
Computes the base 2 log of |x| . More... | |
real_t | comp_s (comp z) |
Computes s(z) . More... | |
real_t | mpfr_s (mpfr_t x) |
Computes s(x) . More... | |
Definition of MPFR complex numbers.
Definition in file comp.h.
#define comp_add | ( | d, | |
a, | |||
b | |||
) |
#define comp_addr | ( | d, | |
a, | |||
r | |||
) |
#define comp_amu | ( | d, | |
a, | |||
r, | |||
buf | |||
) |
Adds the complex number a*r
to d
, where d
,a are complex and r
is unsigned integer.
#define comp_clear | ( | d | ) |
#define comp_div | ( | d, | |
a, | |||
b, | |||
b1, | |||
b2, | |||
b3 | |||
) |
Divides a
by b
and stores the result in d
, all of type comp or comp_ptr.
#define comp_init | ( | d, | |
prec | |||
) |
#define comp_initz | ( | d, | |
prec | |||
) |
#define comp_mul | ( | d, | |
a, | |||
b, | |||
buf1, | |||
buf2 | |||
) |
Multiplies a
to b
and stores the result in d
, all of type comp or comp_ptr.
#define comp_muli | ( | d, | |
a, | |||
i | |||
) |
#define comp_mulr | ( | d, | |
a, | |||
r | |||
) |
#define comp_mulu | ( | d, | |
a, | |||
i | |||
) |
#define comp_neg | ( | d, | |
a | |||
) |
#define comp_set | ( | d, | |
a | |||
) |
#define comp_setr | ( | d, | |
a | |||
) |
#define comp_sqr | ( | d, | |
a, | |||
buf | |||
) |
#define comp_sub | ( | d, | |
a, | |||
b | |||
) |
#define comp_subr | ( | d, | |
a, | |||
r | |||
) |
typedef comp_struct comp[1] |
Practical wrapper for comp_struct
.
To avoid the constant use *
and &
the type compf
is a pointer.
Computes the base 2
log
of |z|
.
z | the complex number |
log_2
(|z|) Computes s(z)
.
z | the complex number |
[log_2(|z|)]+1 real_t mpfr_s | ( | mpfr_t | x | ) |
Computes s(x)
.
x | the real number |
[log_2(|z|)]+1 real_t real_log2 | ( | mpfr_t | x | ) |
Computes the base 2
log
of |x|
.
x | the real number |
log_2
(|x|)