So, should I be wrapping this or should I use more variables and break this
into more parts ?


On Sat, Jun 22, 2013 at 10:14 PM, Dan Colish <notifications@github.com>wrote:

> In xapian-core/weight/dphweight.cc:
>
> > +DPHWeight::unserialise(const string & ) const
> > +{
> > +    return new DPHWeight();
> > +}
> > +
> > +double
> > +DPHWeight::get_sumpart(Xapian::termcount wdf, Xapian::termcount len) const
> > +{
> > +    if (wdf == 0) return 0.0;
> > +
> > +    double base_change(log(2));
> > +    double wdf_to_len = double(wdf) / len;
> > +
> > +    double normalization = (pow((1 - wdf_to_len), 2) / (wdf + 1));
> > +
> > +    double weight = normalization * (wdf * (log((wdf * get_average_length() / len) *
>
> I would like to see this broken into parts or reformatted so its easier to
> read. There's a lot going on in this one statement.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/xapian/xapian/pull/12/files#r4831281>
> .
>