The following code produces result zero:
double x = 1/2 + Math.Tan(0) + 1/2;
Or any other code that involves Math.Tan and some other items in the expression. Compiler seems to just calculate the Tan value and ignore the rest of the expression. Why is that?