-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
B(1) = +½ set 4: generalised Genocchi function #23989
Conversation
Luschny defines the generalised Genocchi function in terms of the generalised Bernoulli function (implemented in sympy#23984) as G(s, a) = 2^s (B(s, a/2) - B(s, (a+1) / 2)) which can be rather easily rewritten as G(s, a) = 2 (B(s, a) - 2^s B(s, (a+1) / 2)) which is the form used here. When s is a nonnegative integer this function reproduces the (so-called) Genocchi polynomials, which have integer coefficients; when in addition a = 1 the Genocchi numbers are obtained, with G(1) = -1. The second term in the rewritten expression (2^s B(s, (a+1)/2)) is what Luschny calls the central Bernoulli function, which reduces to the central Bernoulli numbers when a = 0.
✅ Hi, I am the SymPy bot (v167). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.12. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) before after ratio
[41d90958] [930eb707]
- 992±1μs 625±2μs 0.63 solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
- 2.89±0ms 1.17±0ms 0.41 solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
- 5.76±0.02ms 1.71±0ms 0.30 solve.TimeSparseSystem.time_linear_eq_to_matrix(30)
Full benchmark results can be found as artifacts in GitHub Actions |
As a note, the checklist at the top of #23926 includes not only my ideas for PRs, but also the ideas which have been suggested as important go-alongs, such as the moving of polynomial functionality to the polynomials module just above. |
Looks good. |
Luschny defines the generalised Euler function in terms of the generalised Genocchi function (implemented in sympy#23989) as ⎧ ⎛a⎞ ⎛a + 1⎞ ⎪ -ψ⎜─⎟ + ψ⎜─────⎟ s = -1 ⎪ ⎝2⎠ ⎝ 2 ⎠ E(s, a) = ⎨ ⎪ -G(s + 1, a) ⎪ ───────────── s ≠ -1 ⎩ s + 1 where the top expression is the limiting value of the bottom. When s is a nonnegative integer the function reproduces the Euler polynomials, but unlike the Bernoulli and Genocchi polynomials, a must be set to ½ *and* the result must be multiplied by 2^s to obtain the Euler numbers. For even more clarity Luschny disambiguates the latter with the designation "secant", calling 2^s E(s, 1) the Euler tangent numbers.
References to other Issues or PRs
Part 4 of the changes formerly included in #23926, building upon #23984.
Brief description of what is fixed or changed
This PR generalises
$$G(s,a)=2\left(B(s,a)-2^sB\left(s,\frac{a+1}2\right)\right)$$
genocchi()
to the generalised Genocchi function described in Luschny:Release Notes
genocchi()
now accepts two complex arguments, implementing the generalised Genocchi function described by Luschny.