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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 why log(x)=ln(x)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jonni

United Kingdom
58 Posts

Posted - 01/29/2003 :  09:45:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Why log(x) it is the same value as ln(x) what is wrong?????

And nag_real_polygamma(1,0)=-euler constant;-it is right
nag_real_polygamma(2,0)=1-euler constant;-it is right;
nag_real_polygamma(0.5,0)=-euler constant-log(4)<- has to be this value but it is equal -euler constant-ln(4).here is the problem.

Is it because Log(4) = Ln(4) or is it ONE MORE error also in nag_real_polygamma from NAG library??????????

What is wrong?????????????????
:(((((((((((((((


easwar

USA
1964 Posts

Posted - 01/29/2003 :  10:40:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi jonni,

First of all, NAG is computing the values correctly.
I get nag_real_polygamma(0.5,0) = -1.96351
and I get the same value using Mathematica.

So the Origin C function, which just calls the NAG function, is returning correct values for this function.

Now, I think the problem you are having is the following: In Origin C, log(x) returns the natural logarithm of x. For base 10, the function is log10(x). This is because Origin C follows C syntax. Origin C also supports ln(x) for natural logarithm.

Easwar
OriginLab.



Go to Top of Page

jonni

United Kingdom
58 Posts

Posted - 01/29/2003 :  11:08:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for help.
pleas have a look http://functions.wolfram.com/GammaBetaErf/PolyGamma/03/02/0008/
this is digamma(0.5)=nag_real_polugamma(0.5,0)=-eulerconstant-log(4)
euler constant is 0.57721..(http://functions.wolfram.com/Constants/EulerGamma/03/0001/)
log(4)=0.60205 (calculated using windows calculator)

result = -0.57721..-0.602...~-1.179... so.....
WE HAVE DIFFERENCE ~0.7

why???

Evgeniy
Go to Top of Page

easwar

USA
1964 Posts

Posted - 01/29/2003 :  11:43:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Evgeniy,

In the Wolfram page you quote http://functions.wolfram.com/GammaBetaErf/PolyGamma/03/02/0008/
they mean NATURAL log when they say Log(4), and not logarithm base 10.

When you use your calculator, Log(4) returns log base 10.

So, nag_real_polygamma(0.5,0)
= -Euler Gamma - log(4)
= nag_real_polygamma(1,0) - log(4)
= -0.5772157 - 1.386294
= -1.96351

And the above value of -1.96351 is what I quoted before - both NAG and Mathematica return this same value.

Easwar
OriginLab.


Go to Top of Page

jonni

United Kingdom
58 Posts

Posted - 01/29/2003 :  12:02:25 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Easwar

Thank you for help and your time.

I confused a lot.

I can't find that they mean log as ln.

How more differences I will find between origin c and common expressions? :)
Thanks

Evgeniy
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000