Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add math functions #2609

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

Merged
merged 13 commits into from
Mar 17, 2024
Merged

Add math functions #2609

merged 13 commits into from
Mar 17, 2024

Conversation

farah-salama
Copy link
Contributor

Added functions

  • math.frexp(x): Returns the mantissa and exponent of x as the pair (m, e), where m is a float and e is an integer such that x == m * 2**e exactly.
  • math.isclose(a, b, *, rel_tol = 1e-09, abs_tol = 0.0): Checks if the values a and b are close to each other.

Testing

Tests are added in test_math.py to ensure the correctness of each function.

@farah-salama farah-salama marked this pull request as ready for review March 16, 2024 19:47
Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

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

Great work! Thanks for implementing this. I shared couple comments above.

@ubaidsk
Copy link
Collaborator

ubaidsk commented Mar 16, 2024

Please mark it as "Ready for review" when ready.

@ubaidsk ubaidsk marked this pull request as draft March 16, 2024 21:37
farah-salama and others added 2 commits March 17, 2024 05:55
@farah-salama
Copy link
Contributor Author

Great work! Thanks for implementing this. I shared couple comments above.

Thanks for you time, I added the changes you suggested.

@farah-salama farah-salama marked this pull request as ready for review March 17, 2024 05:09
Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements. I shared one last query and it will be good to merge.

@ubaidsk ubaidsk marked this pull request as draft March 17, 2024 12:40
@ubaidsk ubaidsk marked this pull request as ready for review March 17, 2024 20:47
Copy link
Collaborator

@ubaidsk ubaidsk left a comment

Choose a reason for hiding this comment

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

It looks good to me. Thanks for this! Amazing work!

@ubaidsk ubaidsk enabled auto-merge (squash) March 17, 2024 20:48
@farah-salama
Copy link
Contributor Author

It looks good to me. Thanks for this! Amazing work!

Thank you!

@ubaidsk ubaidsk merged commit 031ced0 into lcompilers:main Mar 17, 2024
@farah-salama farah-salama deleted the add-math-functions branch March 17, 2024 21:08
@farah-salama farah-salama restored the add-math-functions branch March 17, 2024 21:08
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.

2 participants