프로그램 사용/fft, fftw
cabs()
구차니
2023. 2. 15. 16:16
chatGPT에게 fftw의 complex (복소수)를 어떻게 진폭으로 바꾸냐고 물어보니 나온 함수
| #include <complex.h> double cabs(double complex z); float cabsf(float complex z); long double cabsl(long double complex z); Link with -lm. Description The cabs() function returns the absolute value of the complex number z. The result is a real number. Versions These functions first appeared in glibc in version 2.1. Conforming to C99. Notes The function is actually an alias for hypot(a, b) (or, equivalently, sqrt(a*a + b*b)). |
[링크 : https://linux.die.net/man/3/cabs]
그나저나 저 copmlex라는 변수 타입은 어디서 어떻게 정의 되어 있나?
C99 지원하는 컴파일러의 primitive인가?
| ISO C99 supports complex floating data types, and as an extension GCC supports them in C90 mode and in C++. GCC also supports complex integer data types which are not part of ISO C99. You can declare complex types using the keyword _Complex. As an extension, the older GNU keyword __complex__ is also supported. |
[링크 : http://./cortexa53-crypto-poky-linux/usr/src/debug/glibc/2.33-r0/git/include/complex.h]