Skip to content

MAINT: more fixes in loggamma #6804

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

Merged
merged 4 commits into from
Nov 27, 2016
Merged

MAINT: more fixes in loggamma #6804

merged 4 commits into from
Nov 27, 2016

Conversation

person142
Copy link
Member

This:

  • Adds an internal function for evaluating complex polynomials
  • Uses it for more efficient evaluation of the Taylor/asymptotic series in loggamma
  • Adjusts the decision boundary for the Taylor series
  • Tightens the tests slightly to account for accuracy gains from the above.

#define sc_fma(x, y, z) fma(x, y, z)
#else
/* No C99, define fma as (x*y) + z and maybe the compiler picks it up */
#define sc_fma(x, y, z) ((x*y) + z)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add brackets around x and y? fma(1+2, 3, 4)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah good point.

@rgommers rgommers added maintenance Items related to regular maintenance tasks scipy.special labels Nov 26, 2016
@rgommers rgommers merged commit f0c8a0e into scipy:master Nov 27, 2016
@rgommers
Copy link
Member

LGTM, merged. Thanks Josh.

@rgommers
Copy link
Member

I wasn't 100% sure about the changes to test values in test_mpmath, but I verified that the old test values also still pass.

@rgommers rgommers added this to the 0.19.0 milestone Nov 27, 2016
@person142 person142 deleted the loggamma branch March 12, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.special
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants