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

Added u256_div_mod_n #3190

Merged
merged 1 commit into from
May 21, 2023
Merged

Added u256_div_mod_n #3190

merged 1 commit into from
May 21, 2023

Conversation

yuvalsw
Copy link
Contributor

@yuvalsw yuvalsw commented May 18, 2023

This change is Reviewable

@yuvalsw yuvalsw requested a review from orizi May 18, 2023 13:01
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @yuvalsw)


corelib/src/integer.cairo line 1224 at r1 (raw file):

    a: u256, b: NonZero<u256>, n: NonZero<u256>
) -> Option<u256> {
    let inv_b = math::inv_mod(b, n)?;

i think this should be in math

Copy link
Contributor Author

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/integer.cairo line 1224 at r1 (raw file):

Previously, orizi wrote…

i think this should be in math

It's only for u256, as opposed to the others in math, currently.
If you still think it should be there, I can move it. LMK

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @yuvalsw)


corelib/src/integer.cairo line 1224 at r1 (raw file):

Previously, yuvalsw wrote…

It's only for u256, as opposed to the others in math, currently.
If you still think it should be there, I can move it. LMK

I think it still is better (since if and when we'll make it work for others, it will be there anyway)

@yuvalsw yuvalsw force-pushed the yuval/u256_div_mod_n branch from 64f7b1f to 07d813b Compare May 18, 2023 16:13
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @yuvalsw)

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yuvalsw)

@yuvalsw yuvalsw force-pushed the yuval/u256_div_mod_n branch from 07d813b to 9e6f4fd Compare May 18, 2023 16:19
Copy link
Contributor Author

@yuvalsw yuvalsw left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 3 files reviewed, all discussions resolved (waiting on @orizi)


corelib/src/integer.cairo line 1224 at r1 (raw file):

Previously, orizi wrote…

I think it still is better (since if and when we'll make it work for others, it will be there anyway)

Done.

@yuvalsw yuvalsw enabled auto-merge May 18, 2023 16:21
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @yuvalsw)

@yuvalsw yuvalsw force-pushed the yuval/u256_div_mod_n branch from 9e6f4fd to 60e2885 Compare May 21, 2023 09:07
@yuvalsw yuvalsw added this pull request to the merge queue May 21, 2023
Merged via the queue into main with commit bf19e5e May 21, 2023
milancermak pushed a commit to milancermak/cairo that referenced this pull request May 23, 2023
@orizi orizi deleted the yuval/u256_div_mod_n branch June 28, 2023 05:36
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