if (x==1) { // do something if x is 1 y = const.pi; else // do something if x is not 1 y = sin(const.pi*(1-x)) / (1-x); }