From: Peter Zotov Date: 2009-04-08T22:31:59+09:00 Subject: Re: what is happening here Quoting George George : > i have some perl code > > while ($high - $low > 0.001) { # precision > # calculate the sum of all normalized scores > my $sum = Pn * Pn * exp($lambda * $match) * 4 > + Pn * Pn * exp($lambda * $mismatch) * 12; > # refine guess at lambda > if ($sum > 1) { > $high = $lambda; > $lambda = ($lambda + $low)/2; > } > else { > $low = $lambda; > $lambda = ($lambda + $high)/2; > } > } > Pn * exp($lambda * $match) is Pn * (Math::E ** (lambda + match)), not Pn ** (lambda + match). WBR, Peter Zotov