![]() |
От: | Sinix | |
Дата: | 07.12.16 06:26 | ||
Оценка: |
11 (3)
+1
![]() ![]() |
I was testing what was returned from division including zeroes i.e. 0/1, 1/0 and 0/0. For this I used something similar to the following:
Console.WriteLine(1d / 0d);
However this code prints 8 not Infinity or some other string constant like PositiveInfinity.
...
For those of you who seem to think this is an infinity symbol not an eight the following program:
Console.WriteLine(1d / 0d); double value = 1d / 0d; Console.WriteLine(value); Console.WriteLine(Double.PositiveInfinity); Console.WriteLine(8);
Outputs: