I think it's clearer to give the "if" code its own line when there's an else, and to put braces (`{}') around both parts if one has them.

In a case like this though, you might consider handling the simple case and returning.  Then it's clear that you're done handling it (rather than the reader having to scan down past the long else clause to see if there's more code in common), and it means the code in the else clause is indented one level less.  To compare:

```
    if (wdfn_upper == 0) {
        upper_bound = 0.0;
    } else {
        double wdfn_lower(1.0);
        double TermFrequency(get_termfreq());
        double N(get_collection_size());

        wdfn_lower *= log2(1 + (param_c * get_average_length()) /
                      get_doclength_upper_bound());

        wdfn_upper *= log2(1 + (param_c * get_average_length()) /
                      get_doclength_lower_bound());

        double L_max = 1 / (wdfn_lower + 1);

        double Idf_value_max = log2((N + 1) / (TermFrequency + 0.5));

        upper_bound = get_wqf() * wdfn_upper * L_max * Idf_value_max;
    }
```

vs:

```
    if (wdfn_upper == 0) {
        upper_bound = 0.0;
        return;
    }

    double wdfn_lower(1.0);
    double TermFrequency(get_termfreq());
    double N(get_collection_size());

    wdfn_lower *= log2(1 + (param_c * get_average_length()) /
                  get_doclength_upper_bound());

    wdfn_upper *= log2(1 + (param_c * get_average_length()) /
                  get_doclength_lower_bound());

    double L_max = 1 / (wdfn_lower + 1);

    double Idf_value_max = log2((N + 1) / (TermFrequency + 0.5));

    upper_bound = get_wqf() * wdfn_upper * L_max * Idf_value_max;
```