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

MPowerSeries: Don't go through symbolics to compute exp(0), log(1) #36260

Merged
merged 8 commits into from
Sep 16, 2023

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Sep 13, 2023

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@@ -1910,7 +1910,7 @@ def exp(self, prec=infinity):
are not yet implemented and therefore such cases raise an error::

sage: g = 2 + f
sage: exp(g)
sage: exp(g) # needs sage.symbolic
Copy link
Contributor

Choose a reason for hiding this comment

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

You can avoid SR with g.exp() here and likewise in the other examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this error does not come from going through SR but illustrates that exp(2) does not exist in the base ring.

2 of the other # needs sage.symbolic turned out to be unnecessary due to advances in modularization. Removed in 7dde129

@github-actions
Copy link

Documentation preview for this PR (built with commit e2a76d2; changes) is ready! 🎉

@orlitzky
Copy link
Contributor

Ok, LGTM. I personally prefer foo.is_zero() to not foo since the latter can hide errors, but I'm not losing sleep over it.

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 14, 2023

Thanks!

@vbraun vbraun merged commit c95bd14 into sagemath:develop Sep 16, 2023
17 of 18 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 16, 2023
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.

None yet

3 participants