acf.h – complex floating-point numbers¶
Types, macros and constants¶
-
type acf_struct¶
-
type acf_t¶
An acf_struct consists of a pair of arf_struct:s. An acf_t is defined as an array of length one of type acf_struct, permitting an acf_t to be passed by reference.
-
type acf_ptr¶
Alias for
acf_struct *
, used for vectors of numbers.
-
type acf_srcptr¶
Alias for
const acf_struct *
, used for vectors of numbers when passed as constant input to functions.
-
acf_realref(x)¶
Macro returning a pointer to the real part of x as an arf_t.
-
acf_imagref(x)¶
Macro returning a pointer to the imaginary part of x as an arf_t.
Memory management¶
Basic manipulation¶
Arithmetic¶
-
int acf_mul(acf_t res, const acf_t x, const acf_t y, slong prec, arf_rnd_t rnd)¶
Sets res to the sum, difference or product of x or y, correctly rounding the real and imaginary parts in direction rnd. The return flag has the least significant bit set if the real part is inexact, and the second least significant bit set if the imaginary part is inexact.
Approximate arithmetic¶
The following operations are not correctly rounded. The rnd
parameter
specifies the final direction of rounding, but intermediate roundings
are implementation-defined.