double dabs(double val){ double v; if(val < 0) { v = val*(-1); } else { v = val; } return v;}
double dabs(double val){ return (val < 0) ? -val : val;}