Robin Hankin <r.hankin <at> noc.soton.ac.uk> writes:

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

   I have some code for complex Bessel functions which consists
of R wrappers for C++ code: the licensing a little obscure -- the code is
ultimately from "Computation of Special Functions", Zhang and Jin, John Wiley
and Sons, 1996.  The FORTRAN routines are available from
http://jin.ece.uiuc.edu/routines/routines.html ; Chris Bond
http://www.crbond.com/math.htm has made a C++ translation
available.  Both versions are copyrighted: Zhang and Jin
say "we give permission to the user who downloads these routines to incorporate
any of these routines into his or her programs provided that the copyright is
acknowledged".  The code seems to work for my purposes, but hasn't
been thoroughly tested.

  I can send my crude versions to anyone who would like it.

______________________________________________
R-help@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.

Reply via email to