Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acb_dirichlet_lerch_phi(1, s, a, prec) is inconsistent with acb_dirichlet_hurwitz(s, a, prec) #2078

Open
jaganmn opened this issue Sep 30, 2024 · 0 comments

Comments

@jaganmn
Copy link

jaganmn commented Sep 30, 2024

By definition, $\zeta(s, a) = \Phi(1, s, a)$ and $\zeta(s) = \Phi(1, s, 1)$. acb_dirichlet_lerch_phi(1, s, a, prec) is indeterminate for s with real part less than or equal to 1, but acb_dirichlet_hurwitz(s, a, prec) is not.

#include <flint/flint.h>
#include <flint/acb.h>
#include <flint/acb_dirichlet.h>

int main()
{
	acb_t res, z, s, a;
	slong prec = 53;
	acb_init(res);
	acb_init(z);
	acb_init(s);
	acb_init(a);
	acb_set_d(z,  1.0);
	acb_set_d(s, -1.0);
	acb_set_d(a,  1.0);
	acb_dirichlet_zeta     (res,    s,    prec);
	flint_printf("     zeta: %{acb}\n", res);
	acb_dirichlet_hurwitz  (res,    s, a, prec);
	flint_printf("  hurwitz: %{acb}\n", res);
	acb_dirichlet_lerch_phi(res, z, s, a, prec);
	flint_printf("lerch_phi: %{acb}\n", res);
	acb_clear(res);
	acb_clear(z);
	acb_clear(s);
	acb_clear(a);
	return 0;
}
$ clang -lflint -lmpfr -lgmp test.c -o test.o && ./test.o
     zeta: [-0.0833333 +/- 3.34e-8]
  hurwitz: [-0.0833333 +/- 3.34e-8]
lerch_phi: nan + nan * i

The above seems to come from this part of acb_dirichlet/lerch_phi.c:

    if (acb_is_one(z))
    {
        arb_t one;
        arb_init(one);
        if (arb_gt(acb_realref(s), one))
            acb_dirichlet_hurwitz(res, s, a, prec);
        else
            acb_indeterminate(res);
        arb_clear(one);
        return;
    }

where perhaps the check for arb_gt(acb_realref(s), one) is no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant