// 秒寻科技
// 复数运算
// 周涛
// 2023-03-04

#ifndef __COMPLEX_H__
#define __COMPLEX_H__

#include "../sysdefine/sysdef.h"

// 供外部使用的接口
void util_complex_plus(flt32 *real1, flt32 *imag1, flt32 real2, flt32 imag2);
void util_complex_minus(flt32 *real1, flt32 *imag1, flt32 real2, flt32 imag2);
void util_complex_multiply(flt64 *real1, flt64 *imag1, flt64 real2, flt64 imag2);
void util_complex_divide(flt32 *real1, flt32 *imag1, flt32 real2, flt32 imag2);
flt32 util_complex_modulus(flt32 real, flt32 imag);
uint8 util_complex_sequence_multiply(int sequence_length, float *sequence1_real_ptr, float *sequence1_imag_ptr, float *sequence2_real_ptr, float *sequence2_imag_ptr);
uint8 util_complex_sequence_modulus(int sequence_length, float *sequence_real_ptr, float *sequence_imag_ptr, flt32 *sequence_modulus_ptr);

#endif