2016-09-06 15:32:23 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2016 Pascal Molin
|
2016-08-04 12:32:33 +02:00
|
|
|
|
2016-09-06 15:32:23 +02:00
|
|
|
This file is part of Arb.
|
2016-08-04 12:32:33 +02:00
|
|
|
|
2016-09-06 15:32:23 +02:00
|
|
|
Arb is free software: you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU Lesser General Public License (LGPL) as published
|
|
|
|
by the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
(at your option) any later version. See <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2016-08-04 12:32:33 +02:00
|
|
|
|
|
|
|
#include "acb_dirichlet.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
acb_dirichlet_l_vec_hurwitz(acb_ptr res, const acb_t s,
|
|
|
|
const acb_dirichlet_group_t G, slong prec)
|
|
|
|
{
|
|
|
|
acb_t a, qs;
|
|
|
|
acb_ptr zeta, z;
|
|
|
|
acb_dirichlet_conrey_t cn;
|
|
|
|
|
|
|
|
acb_dirichlet_conrey_init(cn, G);
|
|
|
|
acb_init(qs);
|
|
|
|
acb_init(a);
|
|
|
|
|
2016-09-02 16:09:18 +02:00
|
|
|
prec += n_clog(G->phi_q, 2);
|
|
|
|
|
2016-08-04 12:32:33 +02:00
|
|
|
acb_set_ui(qs, G->q);
|
|
|
|
acb_neg(a, s);
|
|
|
|
acb_pow(qs, qs, a, prec);
|
|
|
|
|
|
|
|
zeta = z = _acb_vec_init(G->phi_q);
|
|
|
|
acb_dirichlet_conrey_one(cn, G);
|
2016-08-04 15:35:33 +02:00
|
|
|
do {
|
2016-08-04 12:32:33 +02:00
|
|
|
|
|
|
|
acb_set_ui(a, cn->n);
|
|
|
|
acb_div_ui(a, a, G->q, prec);
|
|
|
|
acb_hurwitz_zeta(z, s, a, prec);
|
|
|
|
acb_mul(z, z, qs, prec);
|
|
|
|
|
|
|
|
z++;
|
2016-08-04 15:35:33 +02:00
|
|
|
} while (acb_dirichlet_conrey_next(cn, G) >= 0);
|
2016-08-04 12:32:33 +02:00
|
|
|
|
|
|
|
acb_dirichlet_dft_conrey(res, zeta, G, prec);
|
|
|
|
|
|
|
|
acb_dirichlet_conrey_clear(cn);
|
|
|
|
_acb_vec_clear(zeta, G->phi_q);
|
|
|
|
acb_clear(qs);
|
|
|
|
acb_clear(a);
|
|
|
|
}
|