using namespace std;
double value1, value2;
This distinction is useful because sometimes you don't need to generate an exception when a NaN is encountered. For example, when you are calculating and displaying a graph, you do not want to generate an error when a variable's value is infinity, you simply ignore it. On the other hand, in some calculations, an exception must be raised, e.g., when a number is divided by zero. In such cases, a signaling NaN is useful.