MAINT: move upper incomplete gamma series from acb_poly to acb_hypgeom

This commit is contained in:
alex 2016-04-19 15:27:53 -04:00
parent 0380515879
commit 650d891efc
6 changed files with 20 additions and 17 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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))
{

View file

@ -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

View file

@ -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

View file

@ -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)