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

feat: add TestLessThanOrEqual hint #133

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

LazarusAA
Copy link

Hi @zmalatrax

Changes made:

  • Implemented and tested the TestLessThanOrEqual hint

  • Here are the test results:

image_2024-08-08_060055453

Please let me know if any additional modifications are needed, and I appreciate any possible feedback.

Copy link
Collaborator

@zmalatrax zmalatrax left a comment

Choose a reason for hiding this comment

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

great :)

src/hints/math/testLessThanOrEqual.ts Outdated Show resolved Hide resolved
@LazarusAA LazarusAA marked this pull request as ready for review August 9, 2024 06:18
@LazarusAA
Copy link
Author

Hi @zmalatrax

Fixed the documentation and the program comparison. I changed the PR to ready for review but if there's any modification needed please let me know.

Copy link
Collaborator

@zmalatrax zmalatrax left a comment

Choose a reason for hiding this comment

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

good, just some details on the JSDoc :)

src/hints/math/testLessThanOrEqual.ts Outdated Show resolved Hide resolved
src/hints/math/testLessThanOrEqual.ts Outdated Show resolved Hide resolved
src/hints/math/testLessThanOrEqual.ts Outdated Show resolved Hide resolved
@LazarusAA
Copy link
Author

Forgot to mention that this closes #133

zmalatrax
zmalatrax previously approved these changes Aug 14, 2024
Copy link
Collaborator

@zmalatrax zmalatrax left a comment

Choose a reason for hiding this comment

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

Good job

@zmalatrax zmalatrax dismissed their stale review August 14, 2024 07:13

Found a Cairo program using the TestLessThanOrEqual hint

Copy link
Collaborator

@zmalatrax zmalatrax left a comment

Choose a reason for hiding this comment

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

We've previously talked about the fact that Cairo 2.7.0 doesn't use the TestLessThanOrEqual hint when doing arithmetic comparisons. I said that we could let the Cairo programs as is, and use an older version of the compiler to test it, until we find a Cairo program that uses it for the latest Cairo version.

I've found a Cairo libfuncs that uses the TestLessThanOrEqual hint, so it can be tested with Cairo 2.7.0 :)

Note: After further thinking, if the latest Cairo version doesn't use a specific hint for one operation, another program should be written, using another operation that still uses this hint, not defaulting on "using a previous Cairo version".

@zmalatrax zmalatrax linked an issue Aug 28, 2024 that may be closed by this pull request
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.

feat: add TestLessThanOrEqual hint
2 participants