Skip to content

Instantly share code, notes, and snippets.

@leppie
Created July 2, 2014 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leppie/9ac1166a0172b44f3271 to your computer and use it in GitHub Desktop.
Save leppie/9ac1166a0172b44f3271 to your computer and use it in GitHub Desktop.
using System;
class Program
{
static void Main(string[] args)
{
var i2_53 = 9007199254740992;
var u2_53 = 9007199254740992U;
var f2_53 = Math.Pow(2, 53);
Console.WriteLine(i2_53 == f2_53);
Console.WriteLine(u2_53 == f2_53);
Console.WriteLine(i2_53 + 1 == f2_53);
Console.WriteLine(u2_53 + 1 == f2_53);
Console.WriteLine(i2_53 + 3 == f2_53 + 4);
Console.WriteLine(u2_53 + 3 == f2_53 + 4);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment