mirror of
https://github.com/vale981/arb
synced 2025-03-06 01:41:39 -05:00
correct branch cut for bessel_k with real z < 0
This commit is contained in:
parent
623c9c57db
commit
bea4792710
3 changed files with 9 additions and 6 deletions
|
@ -50,13 +50,13 @@ acb_hypgeom_bessel_k_asymp(acb_t res, const acb_t nu, const acb_t z, long prec)
|
|||
acb_exp(w, w, prec);
|
||||
acb_mul(t, t, w, prec);
|
||||
|
||||
acb_const_pi(w, prec);
|
||||
acb_div(w, w, z, prec);
|
||||
acb_mul_2exp_si(w, w, -1);
|
||||
acb_sqrt(w, w, prec);
|
||||
|
||||
acb_mul_2exp_si(w, z, 1);
|
||||
acb_rsqrt(w, w, prec);
|
||||
acb_mul(res, t, w, prec);
|
||||
|
||||
arb_const_sqrt_pi(acb_realref(w), prec);
|
||||
acb_mul_arb(res, res, acb_realref(w), prec);
|
||||
|
||||
acb_clear(t);
|
||||
acb_clear(a);
|
||||
acb_clear(b);
|
||||
|
|
|
@ -60,6 +60,9 @@ int main()
|
|||
acb_randtest(w1, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
|
||||
acb_randtest(w2, state, 1 + n_randint(state, 1000), 1 + n_randint(state, 100));
|
||||
|
||||
if (n_randint(state, 4) == 0)
|
||||
arb_zero(acb_imagref(z));
|
||||
|
||||
acb_sub_ui(nu1, nu0, 1, prec0);
|
||||
acb_sub_ui(nu2, nu0, 2, prec0);
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ Modified Bessel functions
|
|||
|
||||
.. math ::
|
||||
|
||||
K_{\nu}(z) = \left(\frac{\pi}{2z}\right)^{1/2} e^{-z}
|
||||
K_{\nu}(z) = \left(\frac{2z}{\pi}\right)^{-1/2} e^{-z}
|
||||
U^{*}(\nu+\tfrac{1}{2}, 2\nu+1, 2z).
|
||||
|
||||
.. function:: void acb_hypgeom_bessel_k_0f1_series(acb_poly_t res, const acb_poly_t nu, const acb_poly_t z, long len, long prec)
|
||||
|
|
Loading…
Add table
Reference in a new issue