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

B(1) = +½ set 9: Appell sequences #24014

Merged
merged 10 commits into from Sep 5, 2022
Merged

Conversation

Parcly-Taxel
Copy link
Contributor

@Parcly-Taxel Parcly-Taxel commented Sep 3, 2022

References to other Issues or PRs

Part 9 of the changes formerly included in #23926, but initiated because of a comment on #23989 suggesting a move of the combinatorial polynomial generators to the polys module.

Brief description of what is fixed or changed

The polynomial sequences associated with bernoulli(), genocchi() and euler() are all Appell sequences. This means they can be generated efficiently by passing different parameters to the same piece of code, something Luschny hints at when he discusses the so-called central Bernoulli and Swiss-knife polynomials, the latter renamed here to André polynomials.

This PR implements the five specific Appell sequences mentioned in the previous paragraph.

Release Notes

  • polys
    • New appellseqs module generating Appell sequences: Bernoulli, central Bernoulli, Genocchi, Euler and André polynomials.

@sympy-bot
Copy link

sympy-bot commented Sep 3, 2022

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:

  • polys
    • New appellseqs module generating Appell sequences: Bernoulli, central Bernoulli, Genocchi, Euler and André polynomials. (#24014 by @Parcly-Taxel)

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.
#### References to other Issues or PRs

Part 9 of the changes formerly included in #23926, but initiated because of [a comment](https://github.com/sympy/sympy/pull/23989#discussion_r957861664) on #23989 suggesting a move of the combinatorial polynomial generators to the `polys` module.

#### Brief description of what is fixed or changed

The polynomial sequences associated with `bernoulli()`, `genocchi()` and `euler()` are all [Appell sequences](https://en.wikipedia.org/wiki/Appell_sequence). This means they can be generated efficiently by passing different parameters to the same piece of code, something Luschny hints at when he discusses the so-called _central Bernoulli_ and _Swiss-knife polynomials_, the latter renamed here to _André polynomials_.

This PR implements the five specific Appell sequences mentioned in the previous paragraph.

#### Release Notes

<!-- BEGIN RELEASE NOTES -->
* polys
    * New `appellseqs` module generating Appell sequences: Bernoulli, central Bernoulli, Genocchi, Euler and André polynomials.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@sympy-bot
Copy link

sympy-bot commented Sep 3, 2022

🟠

Hi, I am the SymPy bot (v167). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it.

This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75.

The following commits add new files:

  • e875bdb:
    • sympy/polys/appellseqs.py
  • 840c632:
    • sympy/polys/tests/test_appellseqs.py

If these files were added/deleted on purpose, you can ignore this message.

@Parcly-Taxel Parcly-Taxel mentioned this pull request Sep 3, 2022
10 tasks
@github-actions
Copy link

github-actions bot commented Sep 3, 2022

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [41d90958]       [5f0b7d3b]
     <sympy-1.11.1^0>                 
-         963±3μs          636±2μs     0.66  solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
-     2.80±0.01ms         1.19±0ms     0.43  solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
-     5.61±0.02ms         1.75±0ms     0.31  solve.TimeSparseSystem.time_linear_eq_to_matrix(30)

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@oscarbenjamin
Copy link
Contributor

polys

  • New appellseqs module generating Appell sequences, including the Bernoulli and Euler polynomials.

The release note should list the new public functions.

Including unifying the two Chebyshev generators into one function.
There are also two kinds of Hermite polynomials, and they too share the
same recurrence, but the second type He_n(x) (aka the probabilist,
reduced or small polynomials) will not be added here.
@oscarbenjamin
Copy link
Contributor

I left a couple of comments but otherwise I think this looks good.

I notice that the line spacing in orthopolys is inconsistent with sometimes one and sometimes two blank lines between functions. Broadly throughout SymPy the convention is two blank lines between top level definitions but it seems that in polys the convention is more often one line so it's probably better to stick with that.

@oscarbenjamin
Copy link
Contributor

Looks good.

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

Successfully merging this pull request may close these issues.

None yet

3 participants