From 650d891efc1b1cdff5b7e21cf5e236b041d3d165 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 19 Apr 2016 15:27:53 -0400 Subject: [PATCH] MAINT: move upper incomplete gamma series from acb_poly to acb_hypgeom --- acb_hypgeom.h | 3 +++ {acb_poly => acb_hypgeom}/gamma_upper_series.c | 8 ++++---- {acb_poly => acb_hypgeom}/test/t-gamma_upper_series.c | 7 ++++--- acb_poly.h | 3 --- doc/source/acb_hypgeom.rst | 9 +++++++++ doc/source/acb_poly.rst | 7 ------- 6 files changed, 20 insertions(+), 17 deletions(-) rename {acb_poly => acb_hypgeom}/gamma_upper_series.c (86%) rename {acb_poly => acb_hypgeom}/test/t-gamma_upper_series.c (94%) diff --git a/acb_hypgeom.h b/acb_hypgeom.h index 16ee9af7..6144f20c 100644 --- a/acb_hypgeom.h +++ b/acb_hypgeom.h @@ -126,6 +126,9 @@ void acb_hypgeom_gamma_upper_1f1b(acb_t res, const acb_t s, const acb_t z, int m void acb_hypgeom_gamma_upper_singular(acb_t res, slong s, const acb_t z, int modified, slong prec); void acb_hypgeom_gamma_upper(acb_t res, const acb_t s, const acb_t z, int modified, slong prec); +void _acb_hypgeom_gamma_upper_series(acb_ptr g, const acb_t s, acb_srcptr h, slong hlen, slong n, slong prec); +void acb_hypgeom_gamma_upper_series(acb_poly_t g, const acb_t s, const acb_poly_t h, slong n, slong prec); + void acb_hypgeom_gamma_lower(acb_t res, const acb_t s, const acb_t z, int modified, slong prec); void acb_hypgeom_expint(acb_t res, const acb_t s, const acb_t z, slong prec); diff --git a/acb_poly/gamma_upper_series.c b/acb_hypgeom/gamma_upper_series.c similarity index 86% rename from acb_poly/gamma_upper_series.c rename to acb_hypgeom/gamma_upper_series.c index 31509c05..b2bf82cd 100644 --- a/acb_poly/gamma_upper_series.c +++ b/acb_hypgeom/gamma_upper_series.c @@ -27,7 +27,7 @@ #include "acb_hypgeom.h" void -_acb_poly_gamma_upper_series(acb_ptr g, const acb_t s, acb_srcptr h, slong hlen, slong n, slong prec) +_acb_hypgeom_gamma_upper_series(acb_ptr g, const acb_t s, acb_srcptr h, slong hlen, slong n, slong prec) { acb_t c; acb_init(c); @@ -69,7 +69,7 @@ _acb_poly_gamma_upper_series(acb_ptr g, const acb_t s, acb_srcptr h, slong hlen, } void -acb_poly_gamma_upper_series(acb_poly_t g, const acb_t s, const acb_poly_t h, slong n, slong prec) +acb_hypgeom_gamma_upper_series(acb_poly_t g, const acb_t s, const acb_poly_t h, slong n, slong prec) { slong hlen = h->length; @@ -85,12 +85,12 @@ acb_poly_gamma_upper_series(acb_poly_t g, const acb_t s, const acb_poly_t h, slo { acb_t t; acb_init(t); - _acb_poly_gamma_upper_series(g->coeffs, s, t, 1, n, prec); + _acb_hypgeom_gamma_upper_series(g->coeffs, s, t, 1, n, prec); acb_clear(t); } else { - _acb_poly_gamma_upper_series(g->coeffs, s, h->coeffs, hlen, n, prec); + _acb_hypgeom_gamma_upper_series(g->coeffs, s, h->coeffs, hlen, n, prec); } _acb_poly_set_length(g, n); diff --git a/acb_poly/test/t-gamma_upper_series.c b/acb_hypgeom/test/t-gamma_upper_series.c similarity index 94% rename from acb_poly/test/t-gamma_upper_series.c rename to acb_hypgeom/test/t-gamma_upper_series.c index 65b636c6..652be9ae 100644 --- a/acb_poly/test/t-gamma_upper_series.c +++ b/acb_hypgeom/test/t-gamma_upper_series.c @@ -24,6 +24,7 @@ ******************************************************************************/ #include "acb_poly.h" +#include "acb_hypgeom.h" int main() { @@ -61,8 +62,8 @@ int main() acb_poly_randtest(B, state, m, bits1, 3); acb_randtest(s, state, bits1, 3); - acb_poly_gamma_upper_series(A, s, S, n1, bits2); - acb_poly_gamma_upper_series(B, s, S, n2, bits3); + acb_hypgeom_gamma_upper_series(A, s, S, n1, bits2); + acb_hypgeom_gamma_upper_series(B, s, S, n2, bits3); acb_poly_set(C, A); acb_poly_truncate(C, FLINT_MIN(n1, n2)); @@ -99,7 +100,7 @@ int main() abort(); } - acb_poly_gamma_upper_series(S, s, S, n1, bits2); + acb_hypgeom_gamma_upper_series(S, s, S, n1, bits2); if (!acb_poly_overlaps(A, S)) { diff --git a/acb_poly.h b/acb_poly.h index a4304d24..91b4a20b 100644 --- a/acb_poly.h +++ b/acb_poly.h @@ -694,9 +694,6 @@ void acb_poly_elliptic_p_series(acb_poly_t res, const acb_poly_t z, const acb_t void _acb_poly_erf_series(acb_ptr g, acb_srcptr h, slong hlen, slong n, slong prec); void acb_poly_erf_series(acb_poly_t g, const acb_poly_t h, slong n, slong prec); -void _acb_poly_gamma_upper_series(acb_ptr g, const acb_t s, acb_srcptr h, slong hlen, slong n, slong prec); -void acb_poly_gamma_upper_series(acb_poly_t g, const acb_t s, const acb_poly_t h, slong n, slong prec); - #ifdef __cplusplus } #endif diff --git a/doc/source/acb_hypgeom.rst b/doc/source/acb_hypgeom.rst index 5fbdb043..65c63862 100644 --- a/doc/source/acb_hypgeom.rst +++ b/doc/source/acb_hypgeom.rst @@ -589,6 +589,15 @@ Incomplete gamma functions The *singular* version evaluates the finite sum directly and therefore assumes that *s* is not too large. +.. function:: void _acb_hypgeom_upper_gamma_series(acb_ptr res, acb_t s, acb_srcptr z, slong zlen, slong n, slong prec) + + +.. function:: void acb_hypgeom_upper_gamma_series(acb_poly_t res, const acb_t s, const acb_poly_t z, slong n, slong prec) + + Sets *res* to the upper incomplete gamma function `\Gamma(s,z)` where *s* is + a constant and *z* is a power series, truncated to length *n*. + + .. function:: void acb_hypgeom_gamma_lower(acb_t res, const acb_t s, const acb_t z, int regularized, slong prec) If *regularized* is 0, computes the lower incomplete gamma function diff --git a/doc/source/acb_poly.rst b/doc/source/acb_poly.rst index 3d583c46..3bac3c27 100644 --- a/doc/source/acb_poly.rst +++ b/doc/source/acb_poly.rst @@ -992,13 +992,6 @@ Other special functions See :func:`acb_hypgeom_erf_series`, :func:`acb_hypgeom_erfc_series`, :func:`acb_hypgeom_erfi_series`. -.. function:: void _acb_poly_upper_gamma_series(acb_ptr res, acb_t s, acb_srcptr z, slong zlen, slong n, slong prec) - -.. function:: void acb_poly_upper_gamma_series(acb_poly_t res, const acb_t s, const acb_poly_t z, slong n, slong prec) - - Sets *res* to the upper incomplete gamma function `\Gamma(s,z)` where *s* is - a constant and *z* is a power series, truncated to length *n*. - .. function:: void _acb_poly_agm1_series(acb_ptr res, acb_srcptr z, slong zlen, slong len, slong prec) .. function:: void acb_poly_agm1_series(acb_poly_t res, const acb_poly_t z, slong n, slong prec)