矢量计算以入参实数为x,返回 的复数结果。
C interface:
void vccis(const int len, const float *src, float complex *dst);
void vzcis(const int len, const double *src, double complex *dst);
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
len |
整型数 |
表示输入向量的元素个数。 len≤0时会提示len无效并返回。 |
输入 |
src |
|
输入向量src,向量长度为len。 若为空指针,会提示空指针错误并返回。 |
输入 |
dst |
|
输出dst,向量长度为len。 若为空指针,会提示空指针错误并返回。 |
输出 |
输入值(src) |
输出值实部(y.real) |
输出值虚部(y.imag) |
---|---|---|
+0 |
1 |
+0 |
-0 |
1 |
-0 |
±inf |
nan |
nan |
nan |
nan |
nan |
C: "kvml.h"
C interface:
int i, len = 4; float src[4] = {0.0f, 2.0f, INFINITY, NAN}; float complex* dst = (float complex*)malloc(sizeof(float complex) * len); if (dst == NULL) { printf("Malloc Failed!\n"); return 0; } vccis(len, src, dst); /** * Output dst: * 1.000000+0.000000*I -0.416147+0.909297*I nan+nan*I nan+nan*I */