#ifndef COMPLEX_H
#define COMPLEX_H

typedef struct {
    double re;
    double im;
} Complex;

Complex complex_new(double re, double im);
Complex complex_add(Complex a, Complex b);
Complex complex_sub(Complex a, Complex b);
Complex complex_mul(Complex a, Complex b);
Complex complex_div(Complex a, Complex b);
Complex complex_scale(Complex a, double alpha);
Complex complex_conjugate(Complex a);
Complex complex_reciprocal(Complex a);
double complex_abs(Complex a);
double complex_phase(Complex a);
Complex complex_exp(Complex a);
Complex complex_sin(Complex a);
Complex complex_cos(Complex a);
Complex complex_tan(Complex a);
void complex_print(Complex a);

#endif
