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 "acb.h"
14 
15 void
arb_hurwitz_zeta(arb_t res,const arb_t s,const arb_t z,slong prec)16 arb_hurwitz_zeta(arb_t res, const arb_t s, const arb_t z, slong prec)
17 {
18     if (!arb_contains_si(s, 1) &&
19         (arb_is_positive(z) ||
20             (arb_is_int(z) && arb_is_int(s) && arb_is_nonpositive(s))))
21     {
22         acb_t a, b, c;
23 
24         acb_init(a);
25         acb_init(b);
26         acb_init(c);
27 
28         acb_set_arb(a, s);
29         acb_set_arb(b, z);
30         acb_hurwitz_zeta(c, a, b, prec);
31         arb_set(res, acb_realref(c));
32 
33         acb_clear(a);
34         acb_clear(b);
35         acb_clear(c);
36     }
37     else
38     {
39         arb_indeterminate(res);
40     }
41 }
42 
43