-
Notifications
You must be signed in to change notification settings - Fork 150
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
Fix leading coefficients might be zero #800
Conversation
66a28b3
to
375a861
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #800 +/- ##
==========================================
+ Coverage 85.10% 85.65% +0.55%
==========================================
Files 57 57
Lines 4047 4119 +72
==========================================
+ Hits 3444 3528 +84
+ Misses 603 591 -12
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
3f2462e
to
24e2fa0
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, just some nits
src/fft/polynomial.rs
Outdated
@@ -113,30 +118,35 @@ impl Polynomial { | |||
} | |||
} | |||
|
|||
/// Evaluates a [`Polynomial`] at a given point in the field. | |||
pub(crate) fn evaluate(&self, point: &BlsScalar) -> BlsScalar { | |||
/// Evaluates a [`Polynomial`] at a given scalar in the field. |
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.
even when is the common way to say it, indeed was a bit confusing to talk about 'points' in this context, as it could seem that it refers to a point in the curve. However, I would not put 'scalar' here as it is not a scalar (even when the type is). I would say 'value'.
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.
you are right! I changed it
src/fft/polynomial.rs
Outdated
@@ -91,16 +90,22 @@ impl Polynomial { | |||
result | |||
} | |||
|
|||
/// Returns the degree of the [`Polynomial`]. | |||
/// Returns the degree, i.e. the index of the highest non-zero coefficient, |
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.
I understand what you say, but could it seem that you are taking the highest coefficient? Maybe say the highest index among all coeffs...?
9f63f69
to
4e21aae
Compare
Resolves #796