2016-07-04 21:18:12 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2016 Fredrik Johansson
|
|
|
|
|
|
|
|
This file is part of Arb.
|
|
|
|
|
|
|
|
Arb is free software: you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU Lesser General Public License (LGPL) as published
|
|
|
|
by the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version. See <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ARB_HYPGEOM_H
|
|
|
|
#define ARB_HYPGEOM_H
|
|
|
|
|
|
|
|
#include "arb.h"
|
|
|
|
#include "arb_poly.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-07-07 18:01:27 +02:00
|
|
|
void _arb_hypgeom_rising_coeffs_1(ulong * c, ulong k, slong l);
|
|
|
|
void _arb_hypgeom_rising_coeffs_2(ulong * c, ulong k, slong l);
|
|
|
|
void _arb_hypgeom_rising_coeffs_fmpz(fmpz * c, ulong k, slong l);
|
|
|
|
|
2021-07-11 08:06:18 +02:00
|
|
|
void arb_hypgeom_rising_ui_forward(arb_t res, const arb_t x, ulong n, slong prec);
|
2021-07-07 18:01:27 +02:00
|
|
|
void arb_hypgeom_rising_ui_rs(arb_t res, const arb_t x, ulong n, ulong m, slong prec);
|
2021-07-11 08:06:18 +02:00
|
|
|
void arb_hypgeom_rising_ui_bs(arb_t res, const arb_t x, ulong n, slong prec);
|
|
|
|
void arb_hypgeom_rising_ui_rec(arb_t res, const arb_t x, ulong n, slong prec);
|
|
|
|
void arb_hypgeom_rising_ui(arb_t y, const arb_t x, ulong n, slong prec);
|
|
|
|
void arb_hypgeom_rising(arb_t y, const arb_t x, const arb_t n, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_rising_ui_jet_powsum(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
|
|
|
|
void arb_hypgeom_rising_ui_jet_rs(arb_ptr res, const arb_t x, ulong n, ulong m, slong len, slong prec);
|
|
|
|
void arb_hypgeom_rising_ui_jet_bs(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
|
|
|
|
void arb_hypgeom_rising_ui_jet(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
|
2021-07-07 18:01:27 +02:00
|
|
|
|
2021-07-25 14:22:46 +02:00
|
|
|
void _arb_hypgeom_gamma_stirling_term_bounds(slong * bound, const mag_t zinv, slong N);
|
|
|
|
void arb_hypgeom_gamma_stirling_sum_horner(arb_t s, const arb_t z, slong N, slong prec);
|
|
|
|
void arb_hypgeom_gamma_stirling_sum_improved(arb_t s, const arb_t z, slong N, slong K, slong prec);
|
|
|
|
|
2021-07-28 17:57:39 +02:00
|
|
|
#define ARB_HYPGEOM_GAMMA_TAB_NUM 536
|
|
|
|
#define ARB_HYPGEOM_GAMMA_TAB_PREC 3456
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
short exp;
|
|
|
|
short tab_pos;
|
|
|
|
char nlimbs;
|
|
|
|
char negative;
|
|
|
|
} arb_hypgeom_gamma_coeff_t;
|
|
|
|
|
2021-09-19 15:07:07 +02:00
|
|
|
ARB_DLL extern arb_hypgeom_gamma_coeff_t arb_hypgeom_gamma_coeffs[ARB_HYPGEOM_GAMMA_TAB_NUM];
|
2021-07-28 17:57:39 +02:00
|
|
|
int _arb_hypgeom_gamma_coeff_shallow(arf_t c, mag_t err, slong i, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_gamma_stirling(arb_t res, const arb_t x, int reciprocal, slong prec);
|
2021-07-29 00:57:53 +02:00
|
|
|
int arb_hypgeom_gamma_taylor(arb_t res, const arb_t x, int reciprocal, slong prec);
|
2021-07-28 17:57:39 +02:00
|
|
|
|
|
|
|
void arb_hypgeom_gamma(arb_t y, const arb_t x, slong prec);
|
|
|
|
void arb_hypgeom_rgamma(arb_t y, const arb_t x, slong prec);
|
|
|
|
|
2021-09-01 09:52:11 +02:00
|
|
|
void arb_hypgeom_lgamma(arb_t y, const arb_t x, slong prec);
|
|
|
|
|
2021-09-02 14:10:38 +02:00
|
|
|
void arb_hypgeom_gamma_fmpq(arb_t y, const fmpq_t x, slong prec);
|
|
|
|
void arb_hypgeom_gamma_fmpz(arb_t y, const fmpz_t x, slong prec);
|
|
|
|
|
2016-07-07 01:49:25 +02:00
|
|
|
void arb_hypgeom_pfq(arb_t res, arb_srcptr a, slong p, arb_srcptr b, slong q,
|
|
|
|
const arb_t z, int regularized, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_0f1(arb_t res, const arb_t a, const arb_t z, int regularized, slong prec);
|
|
|
|
void arb_hypgeom_m(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec);
|
|
|
|
void arb_hypgeom_1f1(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec);
|
|
|
|
void arb_hypgeom_u(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_2f1(arb_t res, const arb_t a, const arb_t b, const arb_t c, const arb_t z, int regularized, slong prec);
|
|
|
|
|
2016-07-04 21:18:12 +02:00
|
|
|
void arb_hypgeom_erf(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_erf_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_erf_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_erfc(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_erfc_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_erfc_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_erfi(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_erfi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_erfi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_fresnel(arb_t res1, arb_t res2, const arb_t z, int normalized, slong prec);
|
|
|
|
void _arb_hypgeom_fresnel_series(arb_ptr s, arb_ptr c, arb_srcptr h, slong hlen, int normalized, slong len, slong prec);
|
|
|
|
void arb_hypgeom_fresnel_series(arb_poly_t s, arb_poly_t c, const arb_poly_t h, int normalized, slong len, slong prec);
|
|
|
|
|
2016-07-06 20:05:09 +02:00
|
|
|
void arb_hypgeom_ei(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_ei_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_ei_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_si(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_si_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_si_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_ci(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_ci_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_ci_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_shi(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_shi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_shi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_chi(arb_t res, const arb_t z, slong prec);
|
|
|
|
void _arb_hypgeom_chi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_chi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_li(arb_t res, const arb_t z, int offset, slong prec);
|
|
|
|
void _arb_hypgeom_li_series(arb_ptr g, arb_srcptr h, slong hlen, int offset, slong len, slong prec);
|
|
|
|
void arb_hypgeom_li_series(arb_poly_t g, const arb_poly_t h, int offset, slong len, slong prec);
|
|
|
|
|
2016-09-05 21:32:19 +02:00
|
|
|
void arb_hypgeom_bessel_j(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_bessel_y(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_bessel_jy(arb_t res1, arb_t res2, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_bessel_i(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_bessel_k(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
|
2018-03-23 13:41:46 +01:00
|
|
|
void arb_hypgeom_bessel_i_scaled(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_bessel_k_scaled(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
|
2016-09-05 20:54:16 +02:00
|
|
|
void arb_hypgeom_airy(arb_t ai, arb_t aip, arb_t bi, arb_t bip, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_airy_jet(arb_ptr ai, arb_ptr bi, const arb_t z, slong len, slong prec);
|
|
|
|
void arb_hypgeom_airy_series(arb_poly_t ai, arb_poly_t ai_prime,
|
|
|
|
arb_poly_t bi, arb_poly_t bi_prime, const arb_poly_t z, slong len, slong prec);
|
|
|
|
void _arb_hypgeom_airy_series(arb_ptr ai, arb_ptr ai_prime,
|
|
|
|
arb_ptr bi, arb_ptr bi_prime, arb_srcptr z, slong zlen, slong len, slong prec);
|
|
|
|
|
2018-07-27 14:30:01 -04:00
|
|
|
void arb_hypgeom_airy_zero(arb_t ai, arb_t aip, arb_t bi, arb_t bip, const fmpz_t n, slong prec);
|
|
|
|
|
2019-02-26 16:43:50 +01:00
|
|
|
void arb_hypgeom_coulomb(arb_t F, arb_t G, const arb_t l, const arb_t eta, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_coulomb_jet(arb_ptr F, arb_ptr G, const arb_t l, const arb_t eta, const arb_t z, slong len, slong prec);
|
|
|
|
void _arb_hypgeom_coulomb_series(arb_ptr F, arb_ptr G, const arb_t l, const arb_t eta, arb_srcptr z, slong zlen, slong len, slong prec);
|
|
|
|
void arb_hypgeom_coulomb_series(arb_poly_t F, arb_poly_t G, const arb_t l, const arb_t eta, const arb_poly_t z, slong len, slong prec);
|
|
|
|
|
2016-09-06 13:12:13 +02:00
|
|
|
void arb_hypgeom_expint(arb_t res, const arb_t s, const arb_t z, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_gamma_lower(arb_t res, const arb_t s, const arb_t z, int regularized, slong prec);
|
|
|
|
void _arb_hypgeom_gamma_lower_series(arb_ptr g, const arb_t s, arb_srcptr h, slong hlen, int regularized, slong n, slong prec);
|
|
|
|
void arb_hypgeom_gamma_lower_series(arb_poly_t g, const arb_t s, const arb_poly_t h, int regularized, slong n, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_gamma_upper(arb_t res, const arb_t s, const arb_t z, int regularized, slong prec);
|
|
|
|
void _arb_hypgeom_gamma_upper_series(arb_ptr g, const arb_t s, arb_srcptr h, slong hlen, int regularized, slong n, slong prec);
|
|
|
|
void arb_hypgeom_gamma_upper_series(arb_poly_t g, const arb_t s, const arb_poly_t h, int regularized, slong n, slong prec);
|
|
|
|
|
|
|
|
void arb_hypgeom_beta_lower(arb_t res, const arb_t a, const arb_t c, const arb_t z, int regularized, slong prec);
|
|
|
|
void arb_hypgeom_beta_lower_series(arb_poly_t res, const arb_t a, const arb_t b, const arb_poly_t z, int regularized, slong len, slong prec);
|
|
|
|
void _arb_hypgeom_beta_lower_series(arb_ptr res, const arb_t a, const arb_t b, arb_srcptr z, slong zlen, int regularized, slong len, slong prec);
|
|
|
|
|
2016-11-23 13:17:38 +01:00
|
|
|
void arb_hypgeom_chebyshev_t(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_chebyshev_u(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_jacobi_p(arb_t res, const arb_t n, const arb_t a, const arb_t b, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_gegenbauer_c(arb_t res, const arb_t n, const arb_t m, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_laguerre_l(arb_t res, const arb_t n, const arb_t m, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_hermite_h(arb_t res, const arb_t nu, const arb_t z, slong prec);
|
|
|
|
void arb_hypgeom_legendre_p(arb_t res, const arb_t n, const arb_t m, const arb_t z, int type, slong prec);
|
|
|
|
void arb_hypgeom_legendre_q(arb_t res, const arb_t n, const arb_t m, const arb_t z, int type, slong prec);
|
|
|
|
|
2017-10-10 22:34:09 +02:00
|
|
|
void arb_hypgeom_legendre_p_ui_deriv_bound(mag_t dp, mag_t dp2, ulong n, const arb_t x, const arb_t x2sub1);
|
2017-10-13 22:09:19 +02:00
|
|
|
void arb_hypgeom_legendre_p_ui_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec);
|
2017-10-09 21:29:48 +02:00
|
|
|
void arb_hypgeom_legendre_p_ui_asymp(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
|
|
|
|
void arb_hypgeom_legendre_p_ui_one(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
|
|
|
|
void arb_hypgeom_legendre_p_ui_zero(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
|
|
|
|
void arb_hypgeom_legendre_p_ui(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec);
|
2017-10-05 16:29:16 +02:00
|
|
|
|
2017-10-11 00:37:57 +02:00
|
|
|
void arb_hypgeom_legendre_p_ui_root(arb_t res, arb_t weight, ulong n, ulong k, slong prec);
|
|
|
|
|
2017-10-04 22:01:40 +02:00
|
|
|
void arb_hypgeom_central_bin_ui(arb_t res, ulong n, slong prec);
|
2016-11-23 13:17:38 +01:00
|
|
|
|
2018-08-01 21:12:46 +02:00
|
|
|
void arb_hypgeom_dilog(arb_t res, const arb_t z, slong prec);
|
|
|
|
|
2016-07-04 21:18:12 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|