## When (X+1==X) is true or how Friday Free Board Quiz became Brainstorm

Each Friday we run Quiz on Twitter and give away one of our boards. This runs for more than year now and it very popular. Usually the questions I ask there are related to Hardware to make balance with the Weekend Programming Challenge. Last Friday the question was: “define X in such way that (X+1 == X) is true” my idea was that if X is big enough due to the computer arithmetic precision the statement above will be evaluated as true. so my answer was: #define X 1.0/0.0 The Quiz runs for one hour and for my big surprise this became real brainstorm and I got many correct answers which were not like mine: #define X FLT_MAX float x = 1e20 double X = INFINITY; int a() {static int x=0; return x++;} #define X a() #define X 1|1 #define X 1||1 #define X std::numeric_limits<double>::infinity() var X= 1.7976931348623157E+10308 #define x=log(0) #define X 2 && 1 #define X 1,1 well done! … although I still try to figure out why #define X 1,1 works 🙂