I used this instead:

```
#include <limits>
...
double lmax = -std::numeric_limits<double>::max();
```