Three kinds of complex numbers
Over the last few weeks I have been reorganizing some of the header
files that come with ng-spice. One of my refactorings put all the
complex number stuff into src/include/complex.h.
If you read the file, you will see three distinct definitions of a
complex number. Namely:
/* Complex numbers. */
struct _complex { /* IBM portability... */
double cx_real;
double cx_imag;
} ;
typedef struct _complex complex;
[...]
typedef struct {
double real;
double imag;
} SPcomplex;
[...]
#define spREAL double
/* Begin `RealNumber'. */
typedef spREAL RealNumber, *RealVector;
/* Begin `ComplexNumber'. */
typedef struct
{ RealNumber Real;
RealNumber Imag;
} ComplexNumber, *ComplexVector;
You will agree with me that only one definition is sufficient and the
others should go. I welcome patches that work toward this goal.
Regards,
--
Arno
PGP signature
Partial thread listing: