[julia-users] Re: Sum of Laguerre polynomials

2014-03-21 Thread Steven G. Johnson
On Thursday, March 20, 2014 5:32:15 PM UTC-4, Paweł Biernat wrote: Taking into account your suggestions I came up with an ad-hoc implementation tailored for my needs. Instead of computing Laguerre(n,1,t-n) I compute the whole expression Laguerre(n,1,t-n)*exp(-(t-n))*(t-n) via a function

[julia-users] Re: Sum of Laguerre polynomials

2014-03-21 Thread Paweł Biernat
W dniu piątek, 21 marca 2014 13:44:17 UTC+1 użytkownik Steven G. Johnson napisał: It would be better to avoid the NaNs in the first place (which come when you multiply 0 * Inf, from an underflow times an overflow). For one thing, floating-point exceptions are slow. For another thing,

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
On Thursday, March 20, 2014 8:26:56 AM UTC-4, Paweł Biernat wrote: # implementation via recursive definition of laguerre polynomials function laguerrel_recursive(n::Integer, alpha::Number, x::Number) l0 = 1# L_{0} l1 = 1+alpha-x# L_{1} This

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
On Thursday, March 20, 2014 8:26:56 AM UTC-4, Paweł Biernat wrote: So it seems that BigFloat is the major drawback. I really wander how Mathematica handles the generation of Laguerre polynomials. I am aware of the GSL bindings and the function sf_laguerre_n, but it also returns NaNs for

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Steven G. Johnson
For example, you may be able to use the analytical asymptotic form of the Laguerre polynomial for large n. Computing special functions efficiently is all about switching between different asymptotic forms, recurrences, etcetera, for different regions of the parameter space.

[julia-users] Re: Sum of Laguerre polynomials

2014-03-20 Thread Paweł Biernat
Taking into account your suggestions I came up with an ad-hoc implementation tailored for my needs. Instead of computing Laguerre(n,1,t-n) I compute the whole expression Laguerre(n,1,t-n)*exp(-(t-n))*(t-n) via a function laguerrel_xexpx. Because I incorporated the exponential factor into the