Hacker News new | ask | show | jobs
by widdma 4408 days ago
It looks like Jmat is using the series expansion (about zero) for Re(z)^2 < (Re(n)+1)/10, with z the argument and n the order. They switch to the asymptotic form for larger arguments, but they're only using the first term.

To improve accuracy, they could truncate the large order expansion when the terms start growing or drop below precision. See the wonderful DLMF S10.17 (http://dlmf.nist.gov/10.17) for the higher order terms.

Note that this expansion will not perform well for large order, and they should switch to one of the series in order instead. Olver's uniform expansion is lovely, but a bit tedious to implement.

1 comments

Ok, improving the Bessel functions is now the first priority thing to fix :)