[Rd] Re Bessel functions of complex argument

Robin Hankin r.hankin at noc.soton.ac.uk
Mon Mar 10 13:17:32 CET 2008


On 10 Mar 2008, at 11:03, Prof Brian Ripley wrote:

> On Mon, 10 Mar 2008, Martin Maechler wrote:
>
>> {Diverted from an R-help thread}
>>
>>>>>>> "Robin" == Robin Hankin <r.hankin at noc.soton.ac.uk>
>>>>>>>    on Mon, 10 Mar 2008 08:49:06 +0000 writes:
>>
>>   Robin> Hello Baptiste Bessel functions with complex
>>   Robin> arguments are not supported in R.
>>
>> Hi Robin,
>> have you looked at *how* pari/gp does this?
>> If they have a C routine, it might be worth considering to add
>> ``the'' complex Bessel functionality to R.
>
> To an R package, surely?  They hardly seem important enough for base  
> R.
>
> There are C implementations in several places, e.g. ACM algorithm  
> 644 (also netlib.org/amos).
>


Thanks for this.  I'll have a look at netlib.  Perhaps a wrapper for  
netlib,
  along the lines of  the gsl package, would be possible.  I also need
the gamma function with complex  arguments and I suspect
that this is included.

PARI/GP  is a large multi-developer effort, and provides an
environment not unlike R but geared towards pure mathematics rather
than statistics.  It includes arbitrary-precision arithmetic and many
pure maths constructs such as number theory and p-adic metrics.

(I must confess to being not terribly familiar with the
Bessel suite; I only  really know about PARI/GP's  elliptic  
functions).  There
is no easy way to access the  code  for any specific functionality
in isolation, AFAICS.

One of my "longer-term" plans is to write a package that includes
a wrapper for GP (PARI is the front end, a command line wrapper) but
this is not entirely straightforward. Implementing a useful wrapper  
proved
to be rather tricky.  I expected that  the methodology would
approximate the gsl package but this was not the case:
many of the features of PARI/GP are alien to the precepts and
tenets of R.   My attempts stalled a couple of years ago after
I finished the elliptic package which included a fit-for-purpose, but
very very basic, wrapper for two or three functions.

Notwithstanding this, I think that an R wrapper for PARI/GP would
be very desirable.   Comments anyone?





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



More information about the R-devel mailing list