Why is infinity printed as "8" in the Windows 10 console? <p>I was testing what was returned from division including zeroes i.e. <code>0/1</code>, <code>1/0</code> and <code>0/0</code>. For this I used something similar to the following:</p> <pre><code>Console.WriteLine(1d / 0d); </code></pre> <p>However this code prints <code>8</code> not <code>Infinity</code> or some other string constant like <code>PositiveInfinity</code>.</p> <p>For completeness all of the following print <code>8</code>:</p> <pre><code>Console.WriteLine(1d / 0d); double value = 1d / 0d; Console.WriteLine(value); Console.WriteLine(Double.PositiveInfinity); </code></pre> <p>And <code>Console.WriteLine(Double.NegativeInfinity);</code> prints <code>-8</code>.</p> <p>Why does this infinity print 8?</p> <hr> <p>For those of you who seem to think this is an infinity symbol not an eight the following program:</p> <pre><code>Console.WriteLine(1d / 0d); double value = 1d / 0d; Console.WriteLine(value); Console.WriteLine(Double.PositiveInfinity); Console.WriteLine(8); </code></pre> <p>Outputs:</p> <p><a href="https://i.stack.imgur.com/ODbah.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ODbah.png" alt="Inifinity output"></a></p>