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

Add support for is_positive attribute #2689

Merged
merged 2 commits into from
May 9, 2024

Conversation

anutosh491
Copy link
Collaborator

This Pr is trying to support the following case (and is also required for the gruntz algorithm)

from lpython import S

def main0():
    a: S = S(5)/S(2)
    b: S = S(-1)/S(4)
    print(a.is_positive)
    print(b.is_positive)

main0()
(lf) anutosh491@spbhat68:~/lpython/lpython$ lpython --enable-symengine examples/expr2.py 
True
False

@anutosh491 anutosh491 enabled auto-merge (squash) May 9, 2024 04:41
@anutosh491 anutosh491 merged commit a8d109c into lcompilers:main May 9, 2024
14 checks passed
@anutosh491 anutosh491 deleted the number_is_positive branch May 9, 2024 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant