Skip to content

Issue 273b #293

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Issue 273b #293

wants to merge 6 commits into from

Conversation

jverzani
Copy link
Contributor

@jverzani jverzani commented Apr 4, 2025

#281 was one way to address #273, this is another:

  • uses different dispatch for real, imag (Like N which is more performant)
  • adds a few types for dispatch in that manner
  • Deprecated real, imag, and conj for expressions with free symbols

Issue #273 points out that symbolic variables are subtypes of Number, not Real, so the definition of real(x) = x isn't correct. That seems right. Since there isn't any underlying support for this functionality in libsymengine there isn't a means to define an unevaluated real(x) or imag(x). So it seems like an error is appropriate. (Already imag(x) was erroring, though with an incorrect call to InexactError, likely my mistake awhile ago.) As this change would be breaking, this PR sets up a deprecation and adds suggested code (commented out) for when the breaking release is ready.

If #292 gets merged first, there are few instances of Basic(0) that could be replaced by ZERO and a few constants to be added to the enumeration in RealConstants. So I'd update this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant