Search SRILM-USER Archives

Match: Format: Sort by:
Search:

Re: bug?

From: Anand Venkataraman <anand at ADDRESS HIDDEN>
Date: Mon, 18 Jul 2005 12:36:02 -0700 (PDT)

Alexander,

No, the code is correct.  Let x = log_10 p.  Then
e^(x ln 10) = 10^x = p.

> inline Prob LogPtoProb(LogP2 prob)
> {
>     if (prob == LogP_Zero) {
>         return 0;
>     } else {
>     return exp(prob * M_LN10);
>     }
> }

&

Click here to go to the SRILM home page.