Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:15:07

0001 /*
0002     Copyright (C) 2016 Fredrik Johansson
0003 
0004     This file is part of FLINT.
0005 
0006     FLINT is free software: you can redistribute it and/or modify it under
0007     the terms of the GNU Lesser General Public License (LGPL) as published
0008     by the Free Software Foundation; either version 3 of the License, or
0009     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
0010 */
0011 
0012 #ifndef ARB_HYPGEOM_H
0013 #define ARB_HYPGEOM_H
0014 
0015 #include "arb_types.h"
0016 
0017 #ifdef __cplusplus
0018 extern "C" {
0019 #endif
0020 
0021 void _arb_hypgeom_rising_coeffs_1(ulong * c, ulong k, slong l);
0022 void _arb_hypgeom_rising_coeffs_2(ulong * c, ulong k, slong l);
0023 void _arb_hypgeom_rising_coeffs_fmpz(fmpz * c, ulong k, slong l);
0024 
0025 void arb_hypgeom_rising_ui_forward(arb_t res, const arb_t x, ulong n, slong prec);
0026 void arb_hypgeom_rising_ui_rs(arb_t res, const arb_t x, ulong n, ulong m, slong prec);
0027 void arb_hypgeom_rising_ui_bs(arb_t res, const arb_t x, ulong n, slong prec);
0028 void arb_hypgeom_rising_ui_rec(arb_t res, const arb_t x, ulong n, slong prec);
0029 void arb_hypgeom_rising_ui(arb_t y, const arb_t x, ulong n, slong prec);
0030 void arb_hypgeom_rising(arb_t y, const arb_t x, const arb_t n, slong prec);
0031 
0032 void arb_hypgeom_rising_ui_jet_powsum(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
0033 void arb_hypgeom_rising_ui_jet_rs(arb_ptr res, const arb_t x, ulong n, ulong m, slong len, slong prec);
0034 void arb_hypgeom_rising_ui_jet_bs(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
0035 void arb_hypgeom_rising_ui_jet(arb_ptr res, const arb_t x, ulong n, slong len, slong prec);
0036 
0037 void _arb_hypgeom_gamma_stirling_term_bounds(slong * bound, const mag_t zinv, slong N);
0038 void arb_hypgeom_gamma_stirling_sum_horner(arb_t s, const arb_t z, slong N, slong prec);
0039 void arb_hypgeom_gamma_stirling_sum_improved(arb_t s, const arb_t z, slong N, slong K, slong prec);
0040 
0041 #define ARB_HYPGEOM_GAMMA_TAB_NUM 536
0042 #define ARB_HYPGEOM_GAMMA_TAB_PREC 3456
0043 
0044 typedef struct
0045 {
0046     short exp;
0047     short tab_pos;
0048     char nlimbs;
0049     char negative;
0050 } arb_hypgeom_gamma_coeff_t;
0051 
0052 FLINT_DLL extern arb_hypgeom_gamma_coeff_t arb_hypgeom_gamma_coeffs[ARB_HYPGEOM_GAMMA_TAB_NUM];
0053 int _arb_hypgeom_gamma_coeff_shallow(arf_t c, mag_t err, slong i, slong prec);
0054 
0055 void arb_hypgeom_gamma_stirling(arb_t res, const arb_t x, int reciprocal, slong prec);
0056 int arb_hypgeom_gamma_taylor(arb_t res, const arb_t x, int reciprocal, slong prec);
0057 
0058 void arb_hypgeom_gamma(arb_t y, const arb_t x, slong prec);
0059 void arb_hypgeom_rgamma(arb_t y, const arb_t x, slong prec);
0060 
0061 void arb_hypgeom_lgamma(arb_t y, const arb_t x, slong prec);
0062 
0063 void arb_hypgeom_gamma_fmpq(arb_t y, const fmpq_t x, slong prec);
0064 void arb_hypgeom_gamma_fmpz(arb_t y, const fmpz_t x, slong prec);
0065 
0066 void arb_hypgeom_pfq(arb_t res, arb_srcptr a, slong p, arb_srcptr b, slong q,
0067     const arb_t z, int regularized, slong prec);
0068 
0069 void arb_hypgeom_0f1(arb_t res, const arb_t a, const arb_t z, int regularized, slong prec);
0070 void arb_hypgeom_m(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec);
0071 void arb_hypgeom_1f1(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec);
0072 void arb_hypgeom_u(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec);
0073 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);
0074 
0075 void arb_hypgeom_1f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, int regularized, slong prec);
0076 void arb_hypgeom_u_integration(arb_t res, const arb_t a, const arb_t b, const arb_t z, slong prec);
0077 void arb_hypgeom_2f1_integration(arb_t res, const arb_t a, const arb_t b, const arb_t c, const arb_t z, int regularized, slong prec);
0078 
0079 void arb_hypgeom_erf(arb_t res, const arb_t z, slong prec);
0080 void _arb_hypgeom_erf_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0081 void arb_hypgeom_erf_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0082 
0083 void arb_hypgeom_erfc(arb_t res, const arb_t z, slong prec);
0084 void _arb_hypgeom_erfc_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0085 void arb_hypgeom_erfc_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0086 
0087 void arb_hypgeom_erfi(arb_t res, const arb_t z, slong prec);
0088 void _arb_hypgeom_erfi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0089 void arb_hypgeom_erfi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0090 
0091 void arb_hypgeom_erfinv(arb_t res, const arb_t x, slong prec);
0092 void arb_hypgeom_erfcinv(arb_t res, const arb_t x, slong prec);
0093 
0094 void arb_hypgeom_fresnel(arb_t res1, arb_t res2, const arb_t z, int normalized, slong prec);
0095 void _arb_hypgeom_fresnel_series(arb_ptr s, arb_ptr c, arb_srcptr h, slong hlen, int normalized, slong len, slong prec);
0096 void arb_hypgeom_fresnel_series(arb_poly_t s, arb_poly_t c, const arb_poly_t h, int normalized, slong len, slong prec);
0097 
0098 void arb_hypgeom_ei(arb_t res, const arb_t z, slong prec);
0099 void _arb_hypgeom_ei_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0100 void arb_hypgeom_ei_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0101 
0102 void _arb_hypgeom_si_asymp(arb_t res, const arb_t z, slong N, slong prec);
0103 void _arb_hypgeom_si_1f2(arb_t res, const arb_t z, slong N, slong wp, slong prec);
0104 void arb_hypgeom_si(arb_t res, const arb_t z, slong prec);
0105 
0106 void _arb_hypgeom_si_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0107 void arb_hypgeom_si_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0108 
0109 void _arb_hypgeom_ci_asymp(arb_t res, const arb_t z, slong N, slong prec);
0110 void _arb_hypgeom_ci_2f3(arb_t res, const arb_t z, slong N, slong wp, slong prec);
0111 void arb_hypgeom_ci(arb_t res, const arb_t z, slong prec);
0112 
0113 void _arb_hypgeom_ci_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0114 void arb_hypgeom_ci_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0115 
0116 void arb_hypgeom_shi(arb_t res, const arb_t z, slong prec);
0117 void _arb_hypgeom_shi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0118 void arb_hypgeom_shi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0119 
0120 void arb_hypgeom_chi(arb_t res, const arb_t z, slong prec);
0121 void _arb_hypgeom_chi_series(arb_ptr g, arb_srcptr h, slong hlen, slong len, slong prec);
0122 void arb_hypgeom_chi_series(arb_poly_t g, const arb_poly_t h, slong len, slong prec);
0123 
0124 void arb_hypgeom_li(arb_t res, const arb_t z, int offset, slong prec);
0125 void _arb_hypgeom_li_series(arb_ptr g, arb_srcptr h, slong hlen, int offset, slong len, slong prec);
0126 void arb_hypgeom_li_series(arb_poly_t g, const arb_poly_t h, int offset, slong len, slong prec);
0127 
0128 void arb_hypgeom_bessel_j(arb_t res, const arb_t nu, const arb_t z, slong prec);
0129 void arb_hypgeom_bessel_y(arb_t res, const arb_t nu, const arb_t z, slong prec);
0130 void arb_hypgeom_bessel_jy(arb_t res1, arb_t res2, const arb_t nu, const arb_t z, slong prec);
0131 void arb_hypgeom_bessel_i(arb_t res, const arb_t nu, const arb_t z, slong prec);
0132 void arb_hypgeom_bessel_k(arb_t res, const arb_t nu, const arb_t z, slong prec);
0133 void _arb_hypgeom_bessel_j_series(arb_ptr res, const arb_t nu, arb_srcptr z, slong zlen, slong len, slong prec);
0134 void arb_hypgeom_bessel_j_series(arb_poly_t res, const arb_t nu, const arb_poly_t z, slong len, slong prec);
0135 
0136 void arb_hypgeom_bessel_i_scaled(arb_t res, const arb_t nu, const arb_t z, slong prec);
0137 void arb_hypgeom_bessel_k_scaled(arb_t res, const arb_t nu, const arb_t z, slong prec);
0138 
0139 void arb_hypgeom_bessel_i_integration(arb_t res, const arb_t nu, const arb_t z, int scaled, slong prec);
0140 void arb_hypgeom_bessel_k_integration(arb_t res, const arb_t nu, const arb_t z, int scaled, slong prec);
0141 
0142 void arb_hypgeom_airy(arb_t ai, arb_t aip, arb_t bi, arb_t bip, const arb_t z, slong prec);
0143 void arb_hypgeom_airy_jet(arb_ptr ai, arb_ptr bi, const arb_t z, slong len, slong prec);
0144 void arb_hypgeom_airy_series(arb_poly_t ai, arb_poly_t ai_prime,
0145     arb_poly_t bi, arb_poly_t bi_prime, const arb_poly_t z, slong len, slong prec);
0146 void _arb_hypgeom_airy_series(arb_ptr ai, arb_ptr ai_prime,
0147     arb_ptr bi, arb_ptr bi_prime, arb_srcptr z, slong zlen, slong len, slong prec);
0148 
0149 void arb_hypgeom_airy_zero(arb_t ai, arb_t aip, arb_t bi, arb_t bip, const fmpz_t n, slong prec);
0150 
0151 void arb_hypgeom_coulomb(arb_t F, arb_t G, const arb_t l, const arb_t eta, const arb_t z, slong prec);
0152 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);
0153 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);
0154 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);
0155 
0156 void arb_hypgeom_expint(arb_t res, const arb_t s, const arb_t z, slong prec);
0157 
0158 void arb_hypgeom_gamma_lower(arb_t res, const arb_t s, const arb_t z, int regularized, slong prec);
0159 void _arb_hypgeom_gamma_lower_series(arb_ptr g, const arb_t s, arb_srcptr h, slong hlen, int regularized, slong n, slong prec);
0160 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);
0161 
0162 void arb_hypgeom_gamma_upper(arb_t res, const arb_t s, const arb_t z, int regularized, slong prec);
0163 void _arb_hypgeom_gamma_upper_series(arb_ptr g, const arb_t s, arb_srcptr h, slong hlen, int regularized, slong n, slong prec);
0164 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);
0165 
0166 void arb_hypgeom_gamma_upper_integration(arb_t res, const arb_t s, const arb_t z, int regularized, slong prec);
0167 
0168 void arb_hypgeom_beta_lower(arb_t res, const arb_t a, const arb_t c, const arb_t z, int regularized, slong prec);
0169 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);
0170 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);
0171 
0172 void arb_hypgeom_chebyshev_t(arb_t res, const arb_t nu, const arb_t z, slong prec);
0173 void arb_hypgeom_chebyshev_u(arb_t res, const arb_t nu, const arb_t z, slong prec);
0174 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);
0175 void arb_hypgeom_gegenbauer_c(arb_t res, const arb_t n, const arb_t m, const arb_t z, slong prec);
0176 void arb_hypgeom_laguerre_l(arb_t res, const arb_t n, const arb_t m, const arb_t z, slong prec);
0177 void arb_hypgeom_hermite_h(arb_t res, const arb_t nu, const arb_t z, slong prec);
0178 void arb_hypgeom_legendre_p(arb_t res, const arb_t n, const arb_t m, const arb_t z, int type, slong prec);
0179 void arb_hypgeom_legendre_q(arb_t res, const arb_t n, const arb_t m, const arb_t z, int type, slong prec);
0180 
0181 void arb_hypgeom_legendre_p_ui_deriv_bound(mag_t dp, mag_t dp2, ulong n, const arb_t x, const arb_t x2sub1);
0182 void arb_hypgeom_legendre_p_ui_rec(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec);
0183 void arb_hypgeom_legendre_p_ui_asymp(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
0184 void arb_hypgeom_legendre_p_ui_one(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
0185 void arb_hypgeom_legendre_p_ui_zero(arb_t res, arb_t res2, ulong n, const arb_t x, slong K, slong prec);
0186 void arb_hypgeom_legendre_p_ui(arb_t res, arb_t res_prime, ulong n, const arb_t x, slong prec);
0187 
0188 void arb_hypgeom_legendre_p_ui_root(arb_t res, arb_t weight, ulong n, ulong k, slong prec);
0189 
0190 void arb_hypgeom_central_bin_ui(arb_t res, ulong n, slong prec);
0191 
0192 void arb_hypgeom_dilog(arb_t res, const arb_t z, slong prec);
0193 
0194 void _arb_hypgeom_gamma_lower_sum_rs_1(arb_t res, ulong p, ulong q, const arb_t z, slong N, slong prec);
0195 void _arb_hypgeom_gamma_upper_sum_rs_1(arb_t res, ulong p, ulong q, const arb_t z, slong N, slong prec);
0196 
0197 slong _arb_hypgeom_gamma_upper_fmpq_inf_choose_N(mag_t err, const fmpq_t a, const arb_t z, const mag_t abs_tol);
0198 void _arb_hypgeom_gamma_upper_fmpq_inf_bsplit(arb_t res, const fmpq_t a, const arb_t z, slong N, slong prec);
0199 slong _arb_hypgeom_gamma_lower_fmpq_0_choose_N(mag_t err, const fmpq_t a, const arb_t z, const mag_t abs_tol);
0200 void _arb_hypgeom_gamma_lower_fmpq_0_bsplit(arb_t res, const fmpq_t a, const arb_t z, slong N, slong prec);
0201 void _arb_gamma_upper_fmpq_step_bsplit(arb_t Gz1, const fmpq_t a, const arb_t z0, const arb_t z1, const arb_t Gz0, const arb_t expmz0, const mag_t abs_tol, slong prec);
0202 slong _arb_hypgeom_gamma_upper_singular_si_choose_N(mag_t err, slong n, const arb_t z, const mag_t abs_tol);
0203 void _arb_hypgeom_gamma_upper_singular_si_bsplit(arb_t res, slong n, const arb_t z, slong N, slong prec);
0204 int arb_hypgeom_erf_bb(arb_t res, const arb_t z, int complementary, slong prec);
0205 
0206 void arb_hypgeom_sum_fmpq_arb_forward(arb_t res, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0207 void arb_hypgeom_sum_fmpq_arb_rs(arb_t res, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0208 void arb_hypgeom_sum_fmpq_arb_bs(arb_t res, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0209 void arb_hypgeom_sum_fmpq_arb(arb_t res, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0210 
0211 void arb_hypgeom_sum_fmpq_imag_arb_forward(arb_t res1, arb_t res2, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0212 void arb_hypgeom_sum_fmpq_imag_arb_rs(arb_t res1, arb_t res2, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0213 void arb_hypgeom_sum_fmpq_imag_arb_bs(arb_t res_real, arb_t res_imag, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0214 void arb_hypgeom_sum_fmpq_imag_arb(arb_t res1, arb_t res2, const fmpq * a, slong alen, const fmpq * b, slong blen, const arb_t z, int reciprocal, slong N, slong prec);
0215 
0216 
0217 #ifdef __cplusplus
0218 }
0219 #endif
0220 
0221 #endif