Skip to content

Comments

Add support for is_positive attribute#2689

Merged
anutosh491 merged 2 commits intolcompilers:mainfrom
anutosh491:number_is_positive
May 9, 2024
Merged

Add support for is_positive attribute#2689
anutosh491 merged 2 commits intolcompilers:mainfrom
anutosh491:number_is_positive

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
@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