本文介绍了c中复数的算术运算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对如何使用标准库在c语言中执行复数的算术运算感兴趣。例如:
I'm interested in how I can perform arithmetic operations of complex numbers in the c language using a standard library. For example:
#include <stdio.h> #include <math.h> #include <complex.h> int main(int argc, char **argv) { _Dcomplex a; _Dcomplex b = 2. + 3. * _Complex_I; _Dcomplex c = a + b; return 0; }谢谢你
Thanks
推荐答案
2017年3月24日下午2:33,Vite写道:
On 3/24/2017 2:33 PM, Vite wrote:
我对如何使用标准库在c语言中执行复数的算术运算感兴趣。例如:
I'm interested in how I can perform arithmetic operations of complex numbers in the c language using a standard library. For example:
如果我没记错的话,MSVC没有实现C99标准的这一部分。
If I recall correctly, MSVC does not implement this part of C99 standard.
任何理由你不能使用C ++和std :: complex吗?
Any reason you can't use C++ and std::complex?
更多推荐
c中复数的算术运算
发布评论