The question is about modeling infinity in C++ for the double data type. I need it in a header file, so we cannot use functions like numeric_limits
double
numeric_limits
Not sure why you can't use std::numeric_limits in a header file. But there is also this carried over from ANSI C:
#include DBL_MAX