Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
new arb_hypgeom_erf, arb_hypgeom_erfc
  • Loading branch information
fredrik-johansson committed Dec 2, 2021
1 parent b924a3a commit fe6d001
Show file tree
Hide file tree
Showing 13 changed files with 1,390 additions and 55 deletions.
8 changes: 8 additions & 0 deletions acb_hypgeom/erf.c
Expand Up @@ -9,6 +9,7 @@
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/

#include "arb_hypgeom.h"
#include "acb_hypgeom.h"

/* IMAG: erf(z) = 2z/sqrt(pi) * 1F1(1/2, 3/2, -z^2) */
Expand Down Expand Up @@ -277,6 +278,13 @@ acb_hypgeom_erf(acb_t res, const acb_t z, slong prec)
return;
}

if (acb_is_real(z))
{
arb_hypgeom_erf(acb_realref(res), acb_realref(z), prec);
arb_zero(acb_imagref(res));
return;
}

if (acb_is_zero(z))
{
acb_zero(res);
Expand Down
8 changes: 8 additions & 0 deletions acb_hypgeom/erfc.c
Expand Up @@ -9,6 +9,7 @@
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/

#include "arb_hypgeom.h"
#include "acb_hypgeom.h"

void
Expand All @@ -22,6 +23,13 @@ acb_hypgeom_erfc(acb_t res, const acb_t z, slong prec)
return;
}

if (acb_is_real(z))
{
arb_hypgeom_erfc(acb_realref(res), acb_realref(z), prec);
arb_zero(acb_imagref(res));
return;
}

if (acb_is_zero(z))
{
acb_one(res);
Expand Down
4 changes: 4 additions & 0 deletions arb_hypgeom.h
Expand Up @@ -172,13 +172,17 @@ void arb_hypgeom_central_bin_ui(arb_t res, ulong n, slong prec);

void arb_hypgeom_dilog(arb_t res, const arb_t z, slong prec);

void _arb_hypgeom_gamma_lower_sum_rs_1(arb_t res, ulong p, ulong q, const arb_t z, slong N, slong prec);
void _arb_hypgeom_gamma_upper_sum_rs_1(arb_t res, ulong p, ulong q, const arb_t z, slong N, slong prec);

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);
void _arb_hypgeom_gamma_upper_fmpq_inf_bsplit(arb_t res, const fmpq_t a, const arb_t z, slong N, slong prec);
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);
void _arb_hypgeom_gamma_lower_fmpq_0_bsplit(arb_t res, const fmpq_t a, const arb_t z, slong N, slong prec);
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);
slong _arb_hypgeom_gamma_upper_singular_si_choose_N(mag_t err, slong n, const arb_t z, const mag_t abs_tol);
void _arb_hypgeom_gamma_upper_singular_si_bsplit(arb_t res, slong n, const arb_t z, slong N, slong prec);
int arb_hypgeom_erf_bb(arb_t res, const arb_t z, int complementary, slong prec);

#ifdef __cplusplus
}
Expand Down

0 comments on commit fe6d001

Please sign in to comment.