From ad6641266f66f7f8d6560bc2ec0815bc735acb20 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 7 Jul 2024 16:53:53 +0100 Subject: [PATCH 1/2] Add acb.lerch_phi (Lerch transcendent) --- src/flint/types/acb.pyx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/flint/types/acb.pyx b/src/flint/types/acb.pyx index bb2bd6e6..87f4f696 100644 --- a/src/flint/types/acb.pyx +++ b/src/flint/types/acb.pyx @@ -733,6 +733,21 @@ cdef class acb(flint_scalar): acb_hurwitz_zeta((u).val, (s).val, (a).val, getprec()) return u + def lerch_phi(z, s, a): + """ + Lerch transcendent `\Phi(z,s,a)`. + + >>> from flint import showgood + >>> showgood(lambda: acb(1,2).lerch_phi(3, 4), dps=25) + 0.006872751459699249251487346 + 0.01112535314686351879432212j + """ + s = any_as_acb(s) + a = any_as_acb(a) + u = acb.__new__(acb) + acb_dirichlet_lerch_phi((u).val, (z).val, (s).val, (a).val, getprec()) + return u + + def dirichlet_l(s, chi): cdef dirichlet_char cchar if isinstance(chi, dirichlet_char): From 19c5f0d56edb9411c1ecd476e53da971901aaa67 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 7 Jul 2024 20:04:03 +0100 Subject: [PATCH 2/2] Add release note about lerch_phi --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b3ff1f02..c9e9c57c 100644 --- a/README.md +++ b/README.md @@ -132,21 +132,25 @@ CHANGELOG ------------- Next release: +- [gh-161](https://github.com/flintlib/python-flint/pull/161) + Add `acb.lerch_phi` to compute the Lerch transcendent. - [gh-160](https://github.com/flintlib/python-flint/pull/160) Add `bits` to `arb` and `acb`, add `log_base` to `arb`. +- [gh-149](https://github.com/flintlib/python-flint/pull/149) + Bump Flint version to 3.1.3-p1 (Flint 3.0.0 - 3.1.3-p1 is supported but the + wheels are built with 3.1.3-p1). - [gh-148](https://github.com/flintlib/python-flint/pull/148) Remove debug symbols to make smaller Linux binaries. - [gh-144](https://github.com/flintlib/python-flint/pull/144) Add `rel_one_ccuracy_bits` to `arb` and `acb`. - [gh-142](https://github.com/flintlib/python-flint/pull/142) - Add `acb_theta` module for the numerical evaluation of [theta functions](https://flintlib.org/doc/acb_theta.html) (only available for Flint >= 3.1). + Add `acb_theta` module for the numerical evaluation of [theta + functions](https://flintlib.org/doc/acb_theta.html) (only available for Flint + >= 3.1). - [gh-137](https://github.com/flintlib/python-flint/pull/137) Add `erfinv` and `erfcinv` for `arb`. - [gh-129](https://github.com/flintlib/python-flint/pull/129) Use meson-python instead of setuptools as the build backend. -- [gh-125](https://github.com/flintlib/python-flint/pull/125) - Bump Flint version to 3.1.2 (Flint 3.0.0 - 3.1.2 is supported but the wheels - are built with 3.1.2). 0.6.0