How can I represent -infinity in C++, Java, etc.?
-infinity
In my exercise, I need to initialize a variable with -infinity to show that it\'s a very
You can have -Infinity as a floating point literal (at least in Java):
-Infinity
double negInf = Double.NEGATIVE_INFINITY;
It is implemented according to the IEEE754 floating point spec.