exp(log10(x)) = x**(1/log(10))

exp(log10($run_total)/$nth_root) = $run_total**(1/(log(10)*number of elements in @bifrequency))

I don't know what you would expect such a quantity to represent.

#subroutine to get bigrams

sub bigram()

{

for (my $i=0; $i <= $#letterline-1; $i++)

{

my $bigram = $letterline[$i] . $letterline[$i+1];

$bigramfrequency{$bigram}++;

$totalbigram++;

}

$_ /= $totalbigram foreach values %bigramfrequency;

return %bigramfrequency;

}

once a bigram goes into bigramfrequency, it stay there forever, so keys (%bititles) is every bigram ever seen in $fh2

and every entry is divided by $totalbigram every time you call sub bigram, so some entrys can get very small.

Which seems to be pointless since I don't see the values in %bititles being used anywhere)

What is the formula you are trying to implement in computing $result?

exp(log10($run_total)/$nth

I don't know what you would expect such a quantity to represent.

#subroutine to get bigrams

sub bigram()

{

for (my $i=0; $i <= $#letterline-1; $i++)

{

my $bigram = $letterline[$i] . $letterline[$i+1];

$bigramfrequency{$bigram}+

$totalbigram++;

}

$_ /= $totalbigram foreach values %bigramfrequency;

return %bigramfrequency;

}

once a bigram goes into bigramfrequency, it stay there forever, so keys (%bititles) is every bigram ever seen in $fh2

and every entry is divided by $totalbigram every time you call sub bigram, so some entrys can get very small.

Which seems to be pointless since I don't see the values in %bititles being used anywhere)

What is the formula you are trying to implement in computing $result?