1 /*
2 Copyright (C) 2012 Fredrik Johansson
3
4 This file is part of Arb.
5
6 Arb is free software: you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License (LGPL) as published
8 by the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version. See <http://www.gnu.org/licenses/>.
10 */
11
12 #include "arb.h"
13 #include "hypgeom.h"
14
15 void
arb_const_apery_eval(arb_t s,slong prec)16 arb_const_apery_eval(arb_t s, slong prec)
17 {
18 hypgeom_t series;
19 arb_t t;
20 arb_init(t);
21 hypgeom_init(series);
22
23 fmpz_poly_set_str(series->A, "3 77 250 205");
24 fmpz_poly_set_str(series->B, "1 1");
25 fmpz_poly_set_str(series->P, "6 0 0 0 0 0 -1");
26 fmpz_poly_set_str(series->Q, "6 32 320 1280 2560 2560 1024");
27
28 prec += 4 + FLINT_CLOG2(prec);
29 arb_hypgeom_infsum(s, t, series, prec, prec);
30 arb_mul_ui(t ,t, 64, prec);
31 arb_div(s, s, t, prec);
32
33 hypgeom_clear(series);
34 arb_clear(t);
35 }
36
37 ARB_DEF_CACHED_CONSTANT(arb_const_apery, arb_const_apery_eval)
38
39