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
 Machine epsilon

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
gpoon Posted - 06/08/2010 : 01:52:57 AM
Origin Ver. 8 and Service Release SR6 (Select Help-->About Origin):
Operating System: Windows XP

Hello!

I would know how to access the machine epsilon constant in Origin C. I read that it is accessible as the constant DBL_EPSILON, but that requires float.h, which doesn't seem to be available in Origin C. Alternatively, I tried to use the NAG function x02ajc which should compute this constant, but when I try to call it Origin C says:

Error, Function was called, but its body could not be located during linking.

My limited ability to read the nagx02.h file didn't give me any clues. I would appreciate any insight you can give.

Many thanks!
Gregory
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 06/09/2010 : 01:13:53 AM
Hi Gregory,

In Origin 8.0, this constant is not available yet. We are very sorry for that. However, it can be accessed in current version, Origin 8.1 SR3. If you are interested, you can download a demo from this page to have a try.

For a workaround, you can define this constant by yourself. I have run the following code in Origin 8.1 SR3 to get the value.

#include <OC_nag8.h>
void testDBL_EPSILON()
{
	double dDBL_EPSILON = X02AJC;
	printf("d=%16.15e\n", dDBL_EPSILON);
}

And the value is 1.110223024625157e-016.

Penn

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