This is how I am running the function.
expr:sum((-1)^k*2^(-v-2*k)*z^(v+2*k)/(k!*gamma(v+k+1)),k,0,160)$
mybess(v,z):=''%$
mybess(1/6,-10) // takes about .270 seconds
Now if I do this
taylor(bessel_j(1/6,x),x,0,16); //last parameter of 20 runs out of memory so I lowered it to 16
horner(%,x);
optimize(%);
mybess(x):=''%;
compile(mybess);
now
mybess(-10) takes about 44 seconds.
It seems like a factor of about 200 difference and the first way is much more accurate.
------------Original Message------------
From: "Richard Fateman" <fateman at cs.berkeley.edu>
To: "'Richard Hennessy'" <rvh2007 at comcast.net>
Cc: maxima at math.utexas.edu
Date: Wed, Jun-11-2008 9:38 PM
Subject: RE: [Maxima] ansi gcl in rpm
there are other things you should do, like converting to floats, declaring x
to be a float, perhaps other issues.
what exactly are you doing to generate the series?
> -----Original Message-----
> From: Richard Hennessy [mailto:rvh2007 at comcast.net]
> Sent: Wednesday, June 11, 2008 2:42 PM
> To: fateman at EECS.Berkeley.EDU
> Cc: 'Maxima List'
> Subject: RE: [Maxima] ansi gcl in rpm
>
> This is worse than just using the series directly. It may be
> fast for the sin function but not the bessels.
>
>
>
>
> ------------Original Message------------
> From: "Richard Fateman" <fateman at cs.berkeley.edu>
> To: "'Richard Hennessy'" <rvh2007 at comcast.net>
> Cc: "'Maxima List'" <maxima at math.utexas.edu>
> Date: Tue, Jun-10-2008 6:40 PM
> Subject: RE: [Maxima] ansi gcl in rpm
>
> try taylor(sin(x),x,0,20);
> horner(%,x);
> optimize(%);
> f(x):=''%;
> compile(f);
>
>
> > -----Original Message-----
> > From: maxima-bounces at math.utexas.edu
> > [mailto:maxima-bounces at math.utexas.edu] On Behalf Of
> Richard Hennessy
> > Sent: Tuesday, June 10, 2008 3:30 PM
> > To: fateman at EECS.Berkeley.EDU; 'Michel Talon'
> > Cc: 'Maxima List'
> > Subject: Re: [Maxima] ansi gcl in rpm
> >
> > I meant taylor takes too long not the power series.
> >
> >
>
>
>