2012-10-08 16:28:28 +02:00
|
|
|
/*=============================================================================
|
|
|
|
|
|
|
|
This file is part of ARB.
|
|
|
|
|
|
|
|
ARB is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
ARB is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with ARB; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
=============================================================================*/
|
|
|
|
/******************************************************************************
|
|
|
|
|
|
|
|
Copyright (C) 2012 Fredrik Johansson
|
|
|
|
|
|
|
|
******************************************************************************/
|
|
|
|
|
2013-01-23 15:54:38 +01:00
|
|
|
#ifndef HYPGEOM_H
|
|
|
|
#define HYPGEOM_H
|
|
|
|
|
2012-10-08 16:28:28 +02:00
|
|
|
#include "fmprb.h"
|
2013-01-23 15:54:38 +01:00
|
|
|
#include "fmpz_poly.h"
|
2012-10-08 16:28:28 +02:00
|
|
|
|
2013-09-17 18:55:23 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-01-23 15:54:38 +01:00
|
|
|
typedef struct
|
2012-10-08 16:28:28 +02:00
|
|
|
{
|
2013-01-23 15:54:38 +01:00
|
|
|
fmpz_poly_t A;
|
|
|
|
fmpz_poly_t B;
|
|
|
|
fmpz_poly_t P;
|
|
|
|
fmpz_poly_t Q;
|
2012-10-08 16:28:28 +02:00
|
|
|
|
2013-01-23 15:54:38 +01:00
|
|
|
/* precomputation data */
|
|
|
|
int have_precomputed;
|
|
|
|
long r;
|
|
|
|
long boundC;
|
|
|
|
long boundD;
|
|
|
|
long boundK;
|
|
|
|
fmpr_t MK;
|
2012-10-08 16:28:28 +02:00
|
|
|
}
|
2013-01-23 15:54:38 +01:00
|
|
|
hypgeom_struct;
|
|
|
|
|
|
|
|
typedef hypgeom_struct hypgeom_t[1];
|
|
|
|
|
|
|
|
void hypgeom_init(hypgeom_t hyp);
|
|
|
|
|
|
|
|
void hypgeom_clear(hypgeom_t hyp);
|
|
|
|
|
|
|
|
void hypgeom_precompute(hypgeom_t hyp);
|
|
|
|
|
|
|
|
long hypgeom_estimate_terms(const fmpr_t z, int r, long prec);
|
|
|
|
|
|
|
|
long hypgeom_bound(fmpr_t error, int r,
|
|
|
|
long C, long D, long K, const fmpr_t TK, const fmpr_t z, long prec);
|
|
|
|
|
|
|
|
void fmprb_hypgeom_sum(fmprb_t P, fmprb_t Q, const hypgeom_t hyp, const long n, long prec);
|
|
|
|
|
|
|
|
void fmprb_hypgeom_infsum(fmprb_t P, fmprb_t Q, hypgeom_t hyp, long target_prec, long prec);
|
|
|
|
|
2013-09-17 18:55:23 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-01-23 15:54:38 +01:00
|
|
|
#endif
|
|
|
|
|