function res = absvalV2(x) %! version 2
res = x;
%!! This assignment will always be done, but it will be wrong if $x < 0$.
if x<0
   res = -x;
   %!! Fix things when $x<0$.
end
