Three kinds of complex numbers


To ng-spice-devel <ng-spice-devel@ieee.ing.uniroma1.it>
From "Arno W. Peters" <a.w.peters@ieee.org>
Date Fri, 16 Jun 2000 23:51:26 +0200
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it
User-Agent Mutt/1.2i


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: