It can be either negative infinity or NaN (not a number). Due to the formatting on the field printf does not differentiate between them.
I tried the following code in Visual Studio 2008:
double a = 0.0;
printf("%.3g
", 1.0 / a); // +inf
printf("%.3g
", -1.0 / a); // -inf
printf("%.3g
", a / a); // NaN
which results in the following output:
1.#J
-1.#J
-1.#J
removing the .3 formatting specifier gives:
1.#INF
-1.#INF
-1.#IND
so it's clear 0/0 gives NaN and -1/0 gives negative infinity (NaN, -inf and +inf are the only "erroneous" floating point numbers, if I recall correctly)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…