[spambayes-dev] Mozilla SpamBayes "porting"

Tim Peters tim.one at comcast.net
Sat Feb 21 00:05:53 EST 2004


[Miguel Vargas]
> By the way, here's the latest incarnation of my code.  I'm still
> somewhat confused about the floor() function in chi2Q.  I understand
> why it's not needed, so why is it in the SpamBayes code?

There's no call to floor() in the entire SpamBayes codebase (let alone in
chi2Q).  What makes you think there is?

...

> ------------------------------------
> Here's the chi2Q funcition:
> double chi2Q (double x2, PRUint32 v) {
>          PRUint32 i;
>          double m = x2 / 2.0;
>          double sum = exp(-m);
>          double term = sum;
>
> 	NS_ASSERTION(!(v & 1), "chi2Q called with odd value");
>
>          for (i=1 ; i<=v/2 ; ++i) {

As covered before, this loop is going around once too often.  Sorry, no time
for more now.




More information about the spambayes-dev mailing list