Информация об изменениях

Сообщение Минутка WTF-13: 8 от 07.12.2016 6:26

Изменено 07.01.2017 16:40 Sinix

Минутка WTF-13: 8
Продолжаем
Автор: rameel
Дата: 03.11.16
продолжать
Автор: Sinix
Дата: 16.09.16
.

Снова отборный товар от stackoverflow:

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:


Желающим ответить "у меня точно такая же нога и она не болит" или просто за животрепещущими подробностями — тынц по ссылке выше
Минутка WTF-13: 8
Продолжаем
Автор: rameel
Дата: 03.11.16
продолжать
Автор: Sinix
Дата: 16.09.16
.

Снова отборный товар от stackoverflow:

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:


Желающим ответить "у меня точно такая же нога и она не болит" или просто за животрепещущими подробностями — тынц по ссылке выше
минутка wtf