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

[GSoC] Core: Fixes _eval_nseries() of Power #19508

Merged
merged 6 commits into from Jun 11, 2020
Merged

Conversation

sachin-4099
Copy link
Contributor

@sachin-4099 sachin-4099 commented Jun 7, 2020

Fixes: #9549
Fixes: #12578
Fixes: #12769
Fixes: #15146
Fixes: #17751
Fixes: #18008

Brief description of what is fixed or changed

The series expansion of b**e is computed as follows:

  • We express b as f*(1 + g) where f is the leading term of b.
    g has order O(x**d) where d is strictly positive.
  • Then b**e = (f**e)*((1 + g)**e). (1 + g)**e is computed using binomial series.

It was very important to rewrite and clean-up Pow._eval_nseries() completely, so that many issues get resolved and it becomes easy to debug any further bugs related to series expansions or limit evaluations.

Other Comments

Regression Tests have been added.

Release Notes

  • core
    • Fixes _eval_nseries() function of power.py

@sympy-bot
Copy link

sympy-bot commented Jun 7, 2020

Hi, I am the SymPy bot (v160). 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.7.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

Fixes: #9549
Fixes: #12578
Fixes: #12769
Fixes: #15146
Fixes: #17751 
Fixes: #18008

#### Brief description of what is fixed or changed
The series expansion of `b**e` is computed as follows:
* We express `b` as `f*(1 + g)` where `f` is the leading term of `b`. 
    `g` has order `O(x**d)` where `d` is strictly positive.
* Then `b**e` = `(f**e)*((1 + g)**e)`. `(1 + g)**e` is computed using binomial series.

It was very important to rewrite and clean-up `Pow._eval_nseries()` completely, so that many issues get resolved and it becomes easy to debug any further bugs related to series expansions or limit evaluations.

#### Other Comments
Regression Tests have been added.

#### Release Notes


<!-- BEGIN RELEASE NOTES -->
* core
  * Fixes `_eval_nseries()` function of `power.py`
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

Merging #19508 into master will increase coverage by 11.494%.
The diff coverage is 97.368%.

@@              Coverage Diff               @@
##            master    #19508        +/-   ##
==============================================
+ Coverage   64.186%   75.681%   +11.494%     
==============================================
  Files          652       653         +1     
  Lines       169748    169836        +88     
  Branches     40071     40047        -24     
==============================================
+ Hits        108956    128535     +19579     
+ Misses       54578     35689     -18889     
+ Partials      6214      5612       -602     

@jksuom
Copy link
Member

jksuom commented Jun 11, 2020

Thanks, this is ready to be merged/

@jksuom jksuom merged commit de62108 into sympy:master Jun 11, 2020
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment