XPath/XQuery numeric-subtract function

Summary

Returns the arithmetic difference of its operands: ($arg1 - $arg2).

Operator Mapping

Defines the semantics of the "-" operator when applied to two numeric values.

Signature

op:numeric-subtract(
$arg1 as xs:numeric,
$arg2 as xs:numeric
) as xs:numeric

Rules

General rules: see .

Notes

For xs:float or xs:double values, if one of the operands is a zero or a finite number and the other is INF or -INF, an infinity of the appropriate sign is returned. If both operands are INF or -INF, NaN is returned. If one of the operands is INF and the other is -INF, an infinity of the appropriate sign is returned.