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 "acb.h"
13 #include "acb_poly.h"
14 #include "acb_dirichlet.h"
15
16 void
acb_zeta_si(acb_t z,slong s,slong prec)17 acb_zeta_si(acb_t z, slong s, slong prec)
18 {
19 if (s >= 0)
20 {
21 arb_zeta_ui(acb_realref(z), s, prec);
22 }
23 else
24 {
25 arb_bernoulli_ui(acb_realref(z), 1-s, prec);
26 arb_div_ui(acb_realref(z), acb_realref(z), 1-s, prec);
27 arb_neg(acb_realref(z), acb_realref(z));
28 }
29
30 arb_zero(acb_imagref(z));
31 return;
32 }
33
34 void
acb_hurwitz_zeta(acb_t z,const acb_t s,const acb_t a,slong prec)35 acb_hurwitz_zeta(acb_t z, const acb_t s, const acb_t a, slong prec)
36 {
37 acb_dirichlet_hurwitz(z, s, a, prec);
38 }
39
40 void
acb_zeta(acb_t z,const acb_t s,slong prec)41 acb_zeta(acb_t z, const acb_t s, slong prec)
42 {
43 acb_dirichlet_zeta(z, s, prec);
44 }
45
46