c中复数的算术运算

编程入门 行业动态 更新时间:2024-10-09 17:20:40
本文介绍了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中复数的算术运算

本文发布于:2023-11-30 15:47:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1650570.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:复数   算术

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!