-
Notifications
You must be signed in to change notification settings - Fork 231
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(math): add range check to string conversion methods #389
feat(math): add range check to string conversion methods #389
Conversation
68c2049
to
8367c09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7d6e8c1
chore(math): add helpful error message when failed to parse BigInt
->
chore(math): add helpful error message when failing to parse BigInt
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_x86.h.tpl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_x86.h.tpl
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/generator/prime_field_generator/prime_field_x86.h.tpl
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/goldilocks/goldilocks_prime_field_x86_special.cc
Outdated
Show resolved
Hide resolved
tachyon/math/finite_fields/goldilocks/goldilocks_prime_field_x86_special.cc
Outdated
Show resolved
Hide resolved
8367c09
to
6a9ac90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
While this may appear redundant in debug mode due to the existing range check in the constructor of PrimeField, we find it acceptable since `From(Dec|Hex)String` is not called frequently and the performance impact in release mode is minimal.
6a9ac90
to
54e801e
Compare
Description
This PR adds the following features:
BigInt<N>
.PrimeFieldXXX::From(Dec|Hex)String
.