Please can you explain why ?


On Sat, Jun 22, 2013 at 10:24 PM, Dan Colish <notifications@github.com>wrote:

> In xapian-core/weight/pl2weight.cc:
>
> > +    double F(get_collection_freq());
> > +    double N(get_collection_size());
> > +    double mean_P = F / N;
> > +
> > +    if (mean_P == 0) return 0.0;
> > +
> > +    double P = wdfn * (log(wdfn / mean_P) / base_change) + ((mean_P - wdfn) / base_change) +
> > +    (0.5 * (log(2 * 3.14 * wdfn) / base_change));
> > +
> > +    return (get_wqf() * L * P);
> > +}
> > +
> > +double
> > +PL2Weight::get_maxpart() const
> > +{
> > +    if (get_wdf_upper_bound() == 0) return 0.0;
>
> I'd assign wdfn_upper then do this check and return.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/xapian/xapian/pull/14/files#r4831298>
> .
>