The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Significant digits for complex numbers?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
verrallr@a Posted - 04/08/2005 : 3:46:39 PM
Origin Version (Select Help-->About Origin): 7.5
Operating System:NT

It seems we cannot double-precision complex numbers. We can only get 7 signicant figures for each of the real and imaginary part. Is that correct?

Richard.
2   L A T E S T    R E P L I E S    (Newest First)
verrallr@a Posted - 04/08/2005 : 11:36:49 PM
OK, thanks Easwar.
In my code, when running Debug and watching Local Variables, it only appears as 7 digits. But, maybe thats just for space. I also used a small program in Origin's help, and it seemed to show only 7 digits. But, your example is conclusive.

Thanks much,
Richard.
easwar Posted - 04/08/2005 : 4:38:37 PM
Hi Richard,

We tested and it works fine:


#define CC_REAL_PART 0.9876543210987e300
#define CC_IMAGINARY_PART 0.1234567890123e-280

void test_complex()
{
complex cc;

cc.m_re = CC_REAL_PART;

cc.m_im = CC_IMAGINARY_PART;

printf("real part = %17.13e\nimag. part = %17.13e\n", cc.m_re, cc.m_im);

ASSERT(cc.m_re == CC_REAL_PART);
ASSERT(cc.m_im == CC_IMAGINARY_PART);

return;
}



Easwar
OriginLab



Edited by - easwar on 04/08/2005 5:00:06 PM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000