Is there a standard and/or portable way to represent the smallest negative value (e.g. to use negative infinity) in a C(++) program?
DBL_MIN in float.h is the smalle
Floating point numbers (IEEE 754) are symmetrical, so if you can represent the greatest value (DBL_MAX or numeric_limits::max()), just prepend a minus sign.
DBL_MAX
And then is the cool way:
double f; (*((long long*)&f))= ~(1LL<<52);