[R] besselK

Robin Hankin r.hankin at noc.soton.ac.uk
Thu Jun 14 12:34:58 CEST 2007


Hello

AFAIK, R has no capability for evaluating Bessel functions for  
complex arguments.

Bessel functions for complex arguments are difficult to evaluate  
numerically.
Some Bessel functions require cut lines or consideration of Riemann  
surfaces.

The GSL library (for which the gsl package is an R wrapper) does
not include such functionality although the issue has arisen
on the GSL email list a couple of times over the last few years.

Writing R functionality for Bessel functions (and in particular
the Airy function) is on my List of Things To Do, but
don't hold your breath  . . .

best wishes


Robin




On 14 Jun 2007, at 10:31, ivivi mwaniki wrote:

> Assistance,
> besselK- complex number problem
>  Im a student  intrested in using R in my learning and research  
> work in option pricing however i have a problem with besselK  
> function In R.
>  Would you assit me in computing the besselK of third kind of a  
> complex number in R.
>  Any code or suggestion will be highly appriceiated
>  eg
>  besselK(2,10)  works well.. but
>  besselK(2,10i) doesnt work !!
>
>  im supprised it works in MATLAB but NOT in R.
>  rgds
>  ivivi mwaniki
>  student kenya
>
>
> ---------------------------------
> Don't pick lemons.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting- 
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743



More information about the R-help mailing list