Not a Number

An old irrational logic guided the IEEE-754 committee



Just for fun, let’s prove that C# equality works for Tuples and (Not, aNumber) equality is reflexive.


            Func<bool, bool> not = x => !x;
            var a = new Tuple<Func<bool,bool>, Type>(not, typeof(double));
            var b = new Tuple<Func<bool, bool>, Type>(not, typeof(double));
            Console.WriteLine(a.Equals(b)); //True
            Console.WriteLine(double.NaN.Equals(double.NaN)); //True
            Console.WriteLine(double.NaN == double.NaN); //False

One thought on “Not a Number

  1. “Not a Number” was the name of the company launched by Ton Roosendaal, the cofounder of NeoGeo, where the 3D software, Blender, was born. Facing the competition of commercial programs, like Maya of Autodesk, it was thanks to a crowdfunding campaign that Blender started to be a successful open source technology, used even in Hollywood’s movies!)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s