In XPath 1.0 use the following expression:
$vNum*($vNum >=0) - $vNum*($vNum < 0)
In case this expression is embedded in an XSLT (XML) attribute, the <
character must be escaped:
$vNum*($vNum >=0) - $vNum*($vNum < 0)
In XPath 2.0 (XSLT 2.0) use the abs() function.