Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Censi committed Oct 28, 2008
1 parent 4026f44 commit bf77398
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ruby/gpc.rb
Expand Up @@ -92,12 +92,17 @@ def gpc(corr)
ptot = p7 - p_lambda * p_lambda

r = ptot.roots
lambda = 0
lambda = 0; set = false;
## Find greatest real root
for i in 0..3
root = r[i]
next if root.im!=0
lambda = [lambda, root.real].max
if not set
lambda = root.real
set = true;
else
lambda = [lambda, root.real].max
end
end

if DEBUG
Expand Down

0 comments on commit bf77398

Please sign in to comment.