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
 Simple problem

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 - 06/05/2008 : 2:32:10 PM
Origin Version v7.5885 (B885)
Operating System:

I am trying to program Density into OriginC.

My OriginC program is :
#include <Origin.h>

double Density(double T)
{return (4956.4/(1.0+3.0*10E-6*(-0.78155+0.1177*T-3.0254E-6*T*T)*
(T-298.)));}

In my script window, I get this for 400 degrees:

bc=Density(400);
bc=;
BC=0.3535184

However this is wrong.

When I give the formula in the Script window for 400 degrees, I get this:

dd=(4956.4/(1.0+3.0*10E-6*(-0.78155+0.1177*400-3.0254E-6*400*400)*(400-298.)));
dd=;
DD=4346.987

That is right.

Why won't my Density give me the correct result in the OriginC program.

Thank you for your assistance.
2   L A T E S T    R E P L I E S    (Newest First)
verrallr@a Posted - 06/06/2008 : 1:32:25 PM
I exited Origin 7.5 (non-Pro) and then logged back in to see if that would help. It didn't.

However, I've figured out a new way to get the density.

Richard.
rlewis Posted - 06/06/2008 : 02:02:36 AM
I compiled and ran the Density function under OriginPro 7.5-SR6 and it gave the correct answer ...

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