| 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 ... |