Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
azuchi committed Feb 4, 2024
1 parent 3b0e78d commit af32ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/kzg/polynomial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def eval_at(x)
x = x.is_a?(BLS::Fr) ? x : BLS::Fr.new(x)
return BLS::Fr::ZERO if coeffs.empty?
return coeffs.first if x.value.zero?
last = coeffs[coeffs.length - 1]
last = coeffs.last
(coeffs.length - 2).step(0, -1) do |i|
tmp = last * x
last = tmp + coeffs[i]
Expand Down

0 comments on commit af32ffa

Please sign in to comment.