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
DBL_MAX can be used. This is found in float.h as follows
#define DBL_MAX 1.7976931348623158e+308 /* max value */