24#ifndef __SUPERLU_DCOMPLEX
25#define __SUPERLU_DCOMPLEX
28#ifndef DCOMPLEX_INCLUDE
29#define DCOMPLEX_INCLUDE
37#define z_add(c, a, b) { (c)->r = (a)->r + (b)->r; \
38 (c)->i = (a)->i + (b)->i; }
41#define z_sub(c, a, b) { (c)->r = (a)->r - (b)->r; \
42 (c)->i = (a)->i - (b)->i; }
45#define zd_mult(c, a, b) { (c)->r = (a)->r * (b); \
46 (c)->i = (a)->i * (b); }
49#define zz_mult(c, a, b) { \
51 cr = (a)->r * (b)->r - (a)->i * (b)->i; \
52 ci = (a)->i * (b)->r + (a)->r * (b)->i; \
57#define zz_conj(a, b) { \
63#define z_eq(a, b) ( (a)->r == (b)->r && (a)->i == (b)->i )
double z_abs1(doublecomplex *)
Approximates the abs. Returns abs(z.r) + abs(z.i)
Definition: dcomplex.c:84
double z_abs(doublecomplex *)
Returns sqrt(z.r^2 + z.i^2)
Definition: dcomplex.c:62
void d_cnjg(doublecomplex *r, doublecomplex *z)
Return the complex conjugate.
Definition: dcomplex.c:106
double d_imag(doublecomplex *)
Return the imaginary part.
Definition: dcomplex.c:113
void z_exp(doublecomplex *, doublecomplex *)
Return the exponentiation.
Definition: dcomplex.c:96
doublecomplex z_sgn(doublecomplex *)
SIGN functions for complex number. Returns z/abs(z)
Definition: dcomplex.c:120
void z_div(doublecomplex *, doublecomplex *, doublecomplex *)
Complex Division c = a/b.
Definition: dcomplex.c:32
doublecomplex z_sqrt(doublecomplex *)
Square-root of a complex number.
Definition: dcomplex.c:135
Definition: slu_dcomplex.h:31
double i
Definition: slu_dcomplex.h:31