1 страниц (3 вхождений)
Problem with complex number (SMath v0.89) - Сообщения
#1 Опубликовано: 02.03.2011 13:13:24
I have problem with comlex calculate...
l←(1+795.7747*i)*(1+795.7747*i)
l=-6.3326*10^5+1591.5494*i
BUT
el(a,1,2)=1+795.7747*i
el(a,2,1)=1+795.7747*i
m←el(a,1,2)*el(a,2,1)
m=6.3326*10^5-1591.5494*i
full program:
http://matros.comehere.cz/tmp/problem.zip
download
printscreen:
http://img828.imageshack.us/i/38752541.png/

l←(1+795.7747*i)*(1+795.7747*i)
l=-6.3326*10^5+1591.5494*i
BUT
el(a,1,2)=1+795.7747*i
el(a,2,1)=1+795.7747*i
m←el(a,1,2)*el(a,2,1)
m=6.3326*10^5-1591.5494*i
full program:
http://matros.comehere.cz/tmp/problem.zip
download
printscreen:
http://img828.imageshack.us/i/38752541.png/

#2 Опубликовано: 02.03.2011 17:50:35
Hello,
You can see the symbolic representation of your matrix elements:
[MATH=eng]el(a,1,2)—{2500+i*π}/{i*π}[/MATH][MATH=eng]el(a,1,2)—{2500+i*π}/{i*π}[/MATH]
They are the same. Now, get their product and see the symbolical result:
[MATH=eng]m←el(a,1,2)*el(a,2,1)[/MATH]
[MATH=eng]m—{(2500+i*π)^2}/{π^2}[/MATH]
and the numerical value would be:
[MATH=eng]m=6.3326*10^5+1591.5494*i[/MATH]
Change the Optimization of calculating "m" Into Optimization|None or Optimization|Numeric and see the numerical value. The numerical result will be:
[MATH=eng]m=-6.3326*10^5-1591.5494*i[/MATH]
I do not get it? Could anyone explain this?
Regards,
Radovan
You can see the symbolic representation of your matrix elements:
[MATH=eng]el(a,1,2)—{2500+i*π}/{i*π}[/MATH][MATH=eng]el(a,1,2)—{2500+i*π}/{i*π}[/MATH]
They are the same. Now, get their product and see the symbolical result:
[MATH=eng]m←el(a,1,2)*el(a,2,1)[/MATH]
[MATH=eng]m—{(2500+i*π)^2}/{π^2}[/MATH]
and the numerical value would be:
[MATH=eng]m=6.3326*10^5+1591.5494*i[/MATH]
Change the Optimization of calculating "m" Into Optimization|None or Optimization|Numeric and see the numerical value. The numerical result will be:
[MATH=eng]m=-6.3326*10^5-1591.5494*i[/MATH]
I do not get it? Could anyone explain this?
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 05.03.2011 14:18:35
Pecular, I tried to duplicate the equations in the original post and no matter what I do I get the same and correct results. I'm using SMath 0.89 Win7.

However, when I duplicate the equations from the attached zip file I do get incorrect results but I noted that the (i*pi)^2 in the denominator does not calculate correctly. The result is 1/pi^2. It should be -1/pi^2. Something happened to the i^2 in the denominator.
When I change optimization to Numeric in the last set of equations, then I get the correct result.

Just by looking at the results without optimization changed, you'ld have a hard time finding this discrepency.

However, when I duplicate the equations from the attached zip file I do get incorrect results but I noted that the (i*pi)^2 in the denominator does not calculate correctly. The result is 1/pi^2. It should be -1/pi^2. Something happened to the i^2 in the denominator.
When I change optimization to Numeric in the last set of equations, then I get the correct result.

Just by looking at the results without optimization changed, you'ld have a hard time finding this discrepency.
Ed
1 страниц (3 вхождений)
-
Новые сообщения
-
Нет новых сообщений