问题描述
#include< stdio.h>
#include< stdlib.h>
#include< stdbool.h>
#include< complex.h>
/ *
双复数z1,z2,z3;
bool flag;
z1 = .4 + .7I;
z2 = cpow(z1,2.0);
z3 = z1 * z1;
flag = false;
flag = true;
if(flag)
{
printf(" %lf%lf \ n",creal(z1),cimag(z1));
printf("%lf%lf \ n",creal(z2),cimag(z2) );
printf("%lf%lf \ n",creal(z3),cimag(z3));
printf("%d \ n",N);
}
* /
int main(int argc,char * argv [])
{
双复数z1,z2,z3,z4,z5;
z1 = 5 + 7I;
z2 = cpow(z1,1I);
printf("%lf%lf \ n",creal(z1),cimag(z1));
printf ("%lf%lf \ n",creal(z2),cimag(z2));
z5 = 0 + I *(3.14159);
z3 = 2.54 + 0 * I;
z4 = cpow(z5,z3);
printf("%lf%lf \ n", creal(z4),cimag(z4));
system(" PAUSE");
返回0;
}
为什么^(i * pi)与大多数人认为的相同? LS
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <complex.h>
/*
double complex z1, z2, z3;
bool flag;
z1 = .4 + .7I;
z2 = cpow(z1, 2.0);
z3 = z1 * z1;
flag = false;
flag = true;
if (flag)
{
printf("%lf %lf\n", creal(z1), cimag(z1));
printf("%lf %lf\n", creal(z2), cimag(z2));
printf("%lf %lf\n", creal(z3), cimag(z3));
printf("%d\n", N);
}
*/
int main(int argc, char *argv[])
{
double complex z1, z2, z3, z4, z5;
z1=5 +7I;
z2=cpow(z1, 1I);
printf("%lf %lf\n", creal(z1), cimag(z1));
printf("%lf %lf\n", creal(z2), cimag(z2));
z5= 0 + I*(3.14159);
z3=2.54 + 0*I;
z4=cpow(z5,z3);
printf("%lf %lf\n", creal(z4), cimag(z4));
system("PAUSE");
return 0;
}
Why doesn''t e^(i *pi) equal what most folks think it does? LS
推荐答案
大多数人会说,如果你试图将一个数字乘以一个
虚数,那是不可能的。
Most folks would say that if you try to multiply a number by itself an
imaginary number of times, that is impossible.
如果我理解你的帖子,那应该是
z3 = 2.718281828459045 + 0 * I;
If I understand your post correctly, this should be
z3=2.718281828459045 + 0*I;
''如果e是大多数人认为的那样,那么接近。
dave
-
Dave Vandervies
这意味着,如果我进入一个缓慢的运行,那么根据洛朗兹 - 菲茨杰拉德方程式我获得虚数质量,并且只能减速。 - 理查德程序中的理查德希思菲尔德
''Tmight come closer if e were what most people think it is.
dave
--
Dave Vandervies dj******@csclub.uwaterloo.ca
This means that, if I break into a slowish run, then according to the
Lorentz-Fitzgerald equations I acquire imaginary mass, and can only decelerate
by running harder. --Richard Heathfield in comp.programming
大多数人会说,如果你试图将一个数字乘以一个
的虚数次,这是不可能的。
Most folks would say that if you try to multiply a number by itself an
imaginary number of times, that is impossible.
e是第一个超然(路易斯维尔,我相信)。 pi是第二个。
它们不相等。 LS
e is the first transcendental (Louisville, I believe). pi is the second.
They are not equal. LS
这篇关于e到i pi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!