Zero Equals What???

Last time I asked you what the output would be from this codeā€¦.

try
{
	checked
	{
		double zero = 0;
		double minus = -1.0e-400;
		double big = 1.0 / zero;
		double minusBig = 1.0 / minus;

		Console.WriteLine(zero == minus);
		Console.WriteLine(big == minusBig);
	}
}
catch (Exception ex)
{
	Console.WriteLine(ex.Message);
}

Continue reading “Zero Equals What???”

Advertisements