1 /*
2     Copyright (C) 2013 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_catalan_eval(arb_t s,slong prec)16 arb_const_catalan_eval(arb_t s, slong prec)
17 {
18     hypgeom_t series;
19     arb_t t;
20 
21     arb_init(t);
22     hypgeom_init(series);
23 
24     fmpz_poly_set_str(series->P, "5  32 160 288 224 64");
25     fmpz_poly_set_str(series->Q, "5  225 3240 14904 23328 11664");
26     fmpz_poly_set_str(series->A, "3  411 976 580");
27     fmpz_poly_set_str(series->B, "5  1 5 9 7 2");
28 
29     prec += FLINT_CLOG2(prec);
30     arb_hypgeom_infsum(s, t, series, prec, prec);
31     arb_mul_ui(t, t, 450, prec);
32     arb_div(s, s, t, prec);
33 
34     hypgeom_clear(series);
35     arb_clear(t);
36 }
37 
38 ARB_DEF_CACHED_CONSTANT(arb_const_catalan, arb_const_catalan_eval)
39 
40