Standard Library FunctionsMath functions abs Return absolute value. Call: doubledres = abs(double dvalue); In dres, the dvalue is always positive.