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

series : Added test for issue 14793 #19737

Merged
merged 2 commits into from Jul 11, 2020
Merged

Conversation

dkodar20
Copy link
Contributor

@dkodar20 dkodar20 commented Jul 10, 2020

Added test to series/test_series.py

References to other Issues or PRs

Fixes #14793

Brief description of what is fixed or changed

Added a test in order to close the issue

Other comments

Release Notes

NO ENTRY

@sympy-bot
Copy link

sympy-bot commented Jul 10, 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.

  • No release notes entry will be added for this pull request.

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.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->
Added test to series/test_series.py
#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
Fixes #14793

#### Brief description of what is fixed or changed
Added a test in order to close the issue

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
NO ENTRY
<!-- END RELEASE NOTES -->

def test_issue_14793():
expr = ((x + S(1)/2) * log(x) - x + log(2*pi)/2 - \
log(factorial(x)) + S(1)/(12*x))*x**3
assert simplify(limit(expr, x, oo) - 1/360) == 0
Copy link
Contributor

@sachin-4099 sachin-4099 Jul 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be assert limit(expr, x, oo) == S(1)/360.

Copy link
Contributor Author

@dkodar20 dkodar20 Jul 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Are there any particular disadvantages of the way done previously?

Copy link
Contributor

@sachin-4099 sachin-4099 Jul 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to simplify() function is always costly, it should be avoided as much as possible.

Copy link
Contributor Author

@dkodar20 dkodar20 Jul 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will make the required changes.

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #19737 into master will increase coverage by 0.019%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##            master    #19737       +/-   ##
=============================================
+ Coverage   75.709%   75.728%   +0.019%     
=============================================
  Files          659       659               
  Lines       171401    171401               
  Branches     40437     40437               
=============================================
+ Hits        129766    129799       +33     
+ Misses       35982     35959       -23     
+ Partials      5653      5643       -10     

@sachin-4099
Copy link
Contributor

sachin-4099 commented Jul 10, 2020

Looks good to me. This can be merged @jksuom.

@jksuom
Copy link
Member

jksuom commented Jul 11, 2020

Thanks.

@jksuom jksuom merged commit 7f30e32 into sympy:master Jul 11, 2020
3 checks passed
@dkodar20 dkodar20 deleted the 14793_series_limits branch Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit involving log(factorial(x)) incorrect
5 participants