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 WideSquare trait. #6194

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Added WideSquare trait. #6194

merged 1 commit into from
Aug 20, 2024

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Aug 12, 2024

Allowing optimized implementaion of WideMul squaring.


This change is Reviewable

@orizi orizi mentioned this pull request Aug 12, 2024
@orizi orizi changed the base branch from pr/orizi/num-updates/1d6f9312 to main August 12, 2024 13:14
@orizi orizi force-pushed the pr/orizi/num-updates/77870a43 branch from abeb7b8 to 4d24ee3 Compare August 12, 2024 13:14
Copy link
Contributor

@gilbens-starkware gilbens-starkware 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 5 of 5 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

@orizi orizi force-pushed the pr/orizi/num-updates/77870a43 branch from 4d24ee3 to 1c17123 Compare August 12, 2024 15:42
@orizi orizi changed the base branch from main to pr/orizi/num-updates/8f9766c2 August 12, 2024 15:42
@orizi orizi force-pushed the pr/orizi/num-updates/77870a43 branch from 1c17123 to 6786aab Compare August 12, 2024 16:16
@orizi orizi changed the base branch from pr/orizi/num-updates/8f9766c2 to main August 12, 2024 16:16
Copy link
Contributor

@gilbens-starkware gilbens-starkware 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 r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

Copy link
Collaborator

@liorgold2 liorgold2 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: all files reviewed, 1 unresolved discussion (waiting on @orizi)


corelib/src/num/traits/ops/widepow2.cairo line 4 at r2 (raw file):

/// A trait for a type that can be squared to produce a wider type.
pub trait WidePow2<T> {

WideSqr. Pow2 is 2**x

Copy link
Collaborator

@TomerStarkware TomerStarkware 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 all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)

Copy link
Collaborator Author

@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: all files reviewed, 1 unresolved discussion (waiting on @liorgold2)


corelib/src/num/traits/ops/widepow2.cairo line 4 at r2 (raw file):

Previously, liorgold2 wrote…

WideSqr. Pow2 is 2**x

WideSqr anywhere i found on the internet was still a square root.

more options?

@orizi orizi changed the title Added WidePow2 trait. Added WideSquare trait. Aug 13, 2024
@orizi orizi force-pushed the pr/orizi/num-updates/77870a43 branch 2 times, most recently from 57a3a8a to ccebb3f Compare August 13, 2024 09:23
Copy link
Collaborator

@liorgold2 liorgold2 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: 1 of 5 files reviewed, all discussions resolved (waiting on @gilbens-starkware)


corelib/src/num/traits/ops/widepow2.cairo line 4 at r2 (raw file):

Previously, orizi wrote…

WideSqr anywhere i found on the internet was still a square root.

more options?

WideSquare is good
(BTW, from what I know sqr is square, sqrt is square root.)

Copy link
Collaborator Author

@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: 1 of 5 files reviewed, all discussions resolved (waiting on @gilbens-starkware)


corelib/src/num/traits/ops/widepow2.cairo line 4 at r2 (raw file):

Previously, liorgold2 wrote…

WideSquare is good
(BTW, from what I know sqr is square, sqrt is square root.)

in general - true.
in microsoft SQL - Sqr == Square root :(
(and that was the only thing i actually found looking around).

@orizi orizi enabled auto-merge August 13, 2024 11:02
Allowing optimized implementaion of WideMul squaring.

commit-id:77870a43
@orizi orizi force-pushed the pr/orizi/num-updates/77870a43 branch from ccebb3f to 8c24505 Compare August 15, 2024 06:13
@orizi orizi requested a review from liorgold2 August 15, 2024 06:39
Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

Copy link
Contributor

@gilbens-starkware gilbens-starkware 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

Copy link
Collaborator

@liorgold2 liorgold2 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 @orizi)

@orizi orizi added this pull request to the merge queue Aug 20, 2024
Merged via the queue into main with commit 86c6cae Aug 20, 2024
87 checks passed
@orizi orizi deleted the pr/orizi/num-updates/77870a43 branch August 20, 2024 14:32
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.

4 participants