Dph optimization

Optimized DPH code.
I think this would be better written using `std::min` (in the `<algorithm>` header):

``` c++
    double max_product = min(max_product_1, max_product_2);
```

That makes it clearer that we're picking the smaller of the two (I notice you managed to get this backwards initially), and as a bonus, you can initialise the variable when you declare it.