Author |
Topic |
|
jonni
United Kingdom
58 Posts |
Posted - 01/29/2003 : 09:45:18 AM
|
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
|
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.
|
|
|
jonni
United Kingdom
58 Posts |
|
easwar
USA
1964 Posts |
Posted - 01/29/2003 : 11:43:18 AM
|
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.
|
|
|
jonni
United Kingdom
58 Posts |
Posted - 01/29/2003 : 12:02:25 PM
|
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 |
|
|
|
Topic |
|