2000-05-30 21:36:33 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
2011-12-27 12:33:01 +01:00
|
|
|
#include "ngspice/config.h"
|
2011-12-11 19:05:00 +01:00
|
|
|
#include "ngspice/memory.h"
|
|
|
|
|
#include "ngspice/dvec.h"
|
|
|
|
|
#include "ngspice/complex.h"
|
2000-05-30 21:36:33 +02:00
|
|
|
|
2000-10-14 23:49:25 +02:00
|
|
|
#include "cmath.h"
|
2000-05-30 21:36:33 +02:00
|
|
|
#include "cmath1.h"
|
|
|
|
|
|
|
|
|
|
FILE *cp_err;
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main(void)
|
|
|
|
|
{
|
2010-10-24 14:45:05 +02:00
|
|
|
ngcomplex_t *c = NULL;
|
|
|
|
|
ngcomplex_t *d = NULL;
|
2000-05-30 21:36:33 +02:00
|
|
|
short int t1;
|
|
|
|
|
short int t2;
|
|
|
|
|
int n1;
|
|
|
|
|
int n2;
|
|
|
|
|
|
|
|
|
|
cp_err = stderr;
|
|
|
|
|
n1 = 1;
|
|
|
|
|
t1 = VF_COMPLEX;
|
|
|
|
|
c = alloc_c(n1);
|
2012-02-07 20:53:12 +01:00
|
|
|
realpart(c[0]) = .0;
|
|
|
|
|
imagpart(c[0]) = 1.0;
|
2010-10-24 14:45:05 +02:00
|
|
|
d = (ngcomplex_t *) cx_j((void *) c, t1, n1, &n2, &t2);
|
2012-02-07 20:53:12 +01:00
|
|
|
if (realpart(d[0]) == -1 && imagpart(d[0]) == 0)
|
2000-05-30 21:36:33 +02:00
|
|
|
return 0;
|
|
|
|
|
else
|
|
|
|
|
return 1;
|
|
|
|
|
}
|