Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralComplex Equations... Pin
EnigmaticalShadow9-Feb-03 10:33
sussEnigmaticalShadow9-Feb-03 10:33 
GeneralRe: Complex Equations... Pin
markkuk9-Feb-03 10:48
markkuk9-Feb-03 10:48 
GeneralRe: Complex Equations... Pin
Anonymous9-Feb-03 11:39
Anonymous9-Feb-03 11:39 
GeneralRe: Complex Equations... Pin
EnigmaticalShadow9-Feb-03 16:14
sussEnigmaticalShadow9-Feb-03 16:14 
GeneralRe: Complex Equations... Pin
Steve Mayfield9-Feb-03 18:52
Steve Mayfield9-Feb-03 18:52 
GeneralRe: Complex Equations... Pin
9-Feb-03 20:15
suss9-Feb-03 20:15 
GeneralRe: Complex Equations... Pin
markkuk10-Feb-03 2:03
markkuk10-Feb-03 2:03 
GeneralRe: Complex Equations... Pin
EnigmaticalShadow10-Feb-03 6:45
sussEnigmaticalShadow10-Feb-03 6:45 
When I do the calculations this way:

z = (2, 3);
c = (-4, -5);
z = std::pow(z, 2) + c;
Final = abs(sqrt(pow(z.real(), 2) + pow(z.imag(), 2)));

I get a different answer than this:

r2 = 2; i2 = 3;
r = -4; i = -5;
r3 = (r2 * r2) + (-(i2 * i2));
i3 = (i2 * r2) + (i2 * r2);
r5 = r3 + r;
i5 = i3 + i;
r2 = r5;
i2 = i5;
Final = abs(pow(pow(r5, 2) + pow(i5, 2), 0.5));

The second way seems to give me the correct answer... Thanks...

GeneralRe: Complex Equations... Pin
EnigmaticalShadow10-Feb-03 7:16
sussEnigmaticalShadow10-Feb-03 7:16 
GeneralDialog Box Question Pin
Paddy9-Feb-03 8:58
Paddy9-Feb-03 8:58 
GeneralRe: Dialog Box Question Pin
Nish Nishant9-Feb-03 9:05
sitebuilderNish Nishant9-Feb-03 9:05 
GeneralRe: Dialog Box Question Pin
Paddy9-Feb-03 9:55
Paddy9-Feb-03 9:55 
GeneralRe: Dialog Box Question Pin
Nish Nishant9-Feb-03 12:21
sitebuilderNish Nishant9-Feb-03 12:21 
Generalcrash with push_back for vector Pin
nss9-Feb-03 7:58
nss9-Feb-03 7:58 
GeneralRe: crash with push_back for vector Pin
Chris Losinger9-Feb-03 8:50
professionalChris Losinger9-Feb-03 8:50 
GeneralRe: crash with push_back for vector Pin
nss9-Feb-03 13:11
nss9-Feb-03 13:11 
GeneralRe: crash with push_back for vector Pin
Solomon Wu9-Feb-03 18:17
Solomon Wu9-Feb-03 18:17 
GeneralRe: crash with push_back for vector Pin
Jambolo9-Feb-03 21:55
Jambolo9-Feb-03 21:55 
Generalthanks everyone!!! Pin
ns10-Feb-03 1:15
ns10-Feb-03 1:15 
Generalreading a string from a file with CFile Read() Pin
nss9-Feb-03 6:40
nss9-Feb-03 6:40 
GeneralRe: reading a string from a file with CFile Read() Pin
Chris Losinger9-Feb-03 7:12
professionalChris Losinger9-Feb-03 7:12 
GeneralThank you!!!!! Pin
nss9-Feb-03 8:19
nss9-Feb-03 8:19 
GeneralCalling functions in DLL Pin
hongheo769-Feb-03 5:24
hongheo769-Feb-03 5:24 
GeneralRe: Calling functions in DLL Pin
Roman Nurik9-Feb-03 5:29
Roman Nurik9-Feb-03 5:29 
GeneralSIMPLE db example Pin
JockeP9-Feb-03 4:58
JockeP9-Feb-03 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.