Skip to content

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

Merged
vbraun merged 8 commits intosagemath:developfrom
mkoeppe:mpowerseries_exp_log_trivial
Sep 16, 2023
Merged

MPowerSeries: Don't go through symbolics to compute exp(0), log(1)#36260
vbraun merged 8 commits intosagemath:developfrom
mkoeppe:mpowerseries_exp_log_trivial

Conversation

@mkoeppe
Copy link
Copy Markdown
Contributor

@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


sage: g = 2 + f
sage: exp(g)
sage: exp(g) # needs sage.symbolic
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown

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

@orlitzky
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

mkoeppe commented Sep 14, 2023

Thanks!

@vbraun vbraun merged commit c95bd14 into sagemath:develop 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.

3 participants