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
#include ... double d = INFINITY;
You can find INFINITY defined in (math.h):
INFINITY
A constant expression of type float representing positive or unsigned infinity, if available; else a positive constant of type float that overflows at translation time.
float