From ripley at stats.ox.ac.uk  Mon Mar 10 12:03:04 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 10 Mar 2008 11:03:04 +0000 (GMT)
Subject: [Rd] Re Bessel functions of complex argument
In-Reply-To: <18389.3354.944541.776906@stat.math.ethz.ch>
References: <2CFB86B5-515C-4968-811C-E2F8716D13DB@ex.ac.uk>
	<73ED823A-9F13-4852-A708-633BEA1BE235@noc.soton.ac.uk>
	<18389.3354.944541.776906@stat.math.ethz.ch>
Message-ID: <alpine.LFD.1.00.0803101056320.6210@gannet.stats.ox.ac.uk>

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.
>
>    Robin> Neither matlab nor the Gnu Scientific Library support
>    Robin> them either.
>
>    Robin> . . . but . . .
>
>    Robin> the pari/gp system (released on the GPL) does:
>
>    Robin> ? besselj(1+I,3)
>    Robin> %3 = 0.6919067491368555819808728680 + 0.4484268613977010268818252591*I
>    Robin> ?
>
>
>    Robin> You can access some pari/gp functionality from within R
>    Robin> by using the elliptic package, although unfortunately
>    Robin> its wrapper function, P.pari(),  is not quite flexible enough
>    Robin> to deal with besselj().
>
>    Robin> I'd be happy to discuss this offline; P.pari() will need only
>    Robin> minor changes to accommodate besselj().
>
> 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).

>
> We have seen several occasions where people had a clear usage
> need for them.
>
> {{I have a vague d?j?-vue feeling on this whole topic ....}}
>
> Martin Maechler, ETH Zurich

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Re Bessel functions of complex argument
Prof Brian Ripley