[R] Problem to compute a function with very large numbers

Hans W Borchers hwborchers at googlemail.com
Sat Aug 21 04:08:29 CEST 2010


Nan Zhao <nzhao <at> student.ethz.ch> writes:

> 
> Thank you Dennis for your explanations!
> 
> The results you found are the same as mine. with first an infinity result,
> followed by NaN. It seems that, when the number becomes too small, R must
> round it up to 0. Hence I was wondering if there might a way to increase the
> number of decimals for extremal computations. I have tried to use "double"
> variables, but this didn't have a bigger success.
> 
> There is no doubt about the function and it orignates from a Kendall's plot
> in measuring dependencies.
> 
> Thank you in advance,
> 
> Best Regards,
> 
> Nan
> 

See the thread "Problem with the precision of numbers" in January this year.
For example in

    http://finzi.psych.upenn.edu/Rhelp10/2010-January/225640.html

you will also find a hint how to compute binomial coefficients with 'Rmpfr'.

Integration will be a problem here that you may have to replace with your own
method for integration, such as Simpson's adaptive formula.

Regards,  Hans Werner



More information about the R-help mailing list