📄 compmath.cpp
字号:
// BZ_HAVE_COMPLEX_MATH1
// Complex math functions, as per 26.2.7 of the Jan'96 draft standard
#include <complex>
#ifndef BZ_NO_NAMESPACES
using namespace std;
#endif
int main()
{
complex<double> x(1.0, 1.0), y(1.0, 1.0);
real(x);
imag(x);
abs(x);
arg(x);
norm(x);
conj(x);
polar(1.0,1.0);
cos(x);
cosh(x);
exp(x);
log(x);
log10(x);
pow(x,1);
pow(x,double(2.0));
pow(x, y);
pow(double(2.0), x);
sin(x);
sinh(x);
sqrt(x);
tan(x);
tanh(x);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -