Answer
double m; if(u >= 0) m = u; else m = -u;