2016-04-26 17:20:05 +02:00
|
|
|
/*
|
2014-06-13 22:08:25 +02:00
|
|
|
Copyright (C) 2012 Fredrik Johansson
|
|
|
|
|
2016-04-26 17:20:05 +02:00
|
|
|
This file is part of Arb.
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
2014-06-13 22:08:25 +02:00
|
|
|
|
|
|
|
#include "acb.h"
|
|
|
|
#include "acb_poly.h"
|
2016-10-25 21:57:37 +02:00
|
|
|
#include "acb_dirichlet.h"
|
2014-06-13 22:08:25 +02:00
|
|
|
|
2015-10-22 15:11:17 +02:00
|
|
|
void
|
2015-11-05 17:43:36 +00:00
|
|
|
acb_zeta_si(acb_t z, slong s, slong prec)
|
2015-10-22 15:11:17 +02:00
|
|
|
{
|
|
|
|
if (s >= 0)
|
|
|
|
{
|
|
|
|
arb_zeta_ui(acb_realref(z), s, prec);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
arb_bernoulli_ui(acb_realref(z), 1-s, prec);
|
|
|
|
arb_div_ui(acb_realref(z), acb_realref(z), 1-s, prec);
|
|
|
|
arb_neg(acb_realref(z), acb_realref(z));
|
|
|
|
}
|
|
|
|
|
|
|
|
arb_zero(acb_imagref(z));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-06-13 22:08:25 +02:00
|
|
|
void
|
2015-11-05 17:43:36 +00:00
|
|
|
acb_hurwitz_zeta(acb_t z, const acb_t s, const acb_t a, slong prec)
|
2014-06-13 22:08:25 +02:00
|
|
|
{
|
2017-06-19 10:23:44 +02:00
|
|
|
acb_dirichlet_hurwitz(z, s, a, prec);
|
2014-06-13 22:08:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2015-11-05 17:43:36 +00:00
|
|
|
acb_zeta(acb_t z, const acb_t s, slong prec)
|
2014-06-13 22:08:25 +02:00
|
|
|
{
|
2016-10-25 21:57:37 +02:00
|
|
|
acb_dirichlet_zeta(z, s, prec);
|
2014-06-13 22:08:25 +02:00
|
|
|
}
|
|
|
|
|