计算E ^( - J)用C [英] Computing e^(-j) in C

查看:333
本文介绍了计算E ^( - J)用C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要计算虚指数在C

I need to compute imaginary exponential in C.

据我所知,是没有C.复数库很可能获得 E ^ X EXP(X) 文件math.h ,但我怎么能计算 e值^( - 我),其中 I =开方(-1)

As far as I know, there is no complex number library in C. It is possible to get e^x with exp(x) of math.h, but how can I compute the value of e^(-i), where i = sqrt(-1)?

推荐答案

请注意复数的指数等于:

Note that exponent of complex number equals:

e^(ix) = cos(x)+i*sin(x)

然后:

e^(-i) = cos(-1)+i*sin(-1)

这篇关于计算E ^( - J)用C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆