arb/acb/zeta.c

46 lines
1,013 B
C
Raw Normal View History

/*
2014-06-13 22:08:25 +02:00
Copyright (C) 2012 Fredrik Johansson
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
void
2015-11-05 17:43:36 +00:00
acb_zeta_si(acb_t z, slong s, slong prec)
{
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
{
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
}