# op:decimal-subtract

Subtracts $decimal-var2 from $decimal-var1. The - operator invokes the decimal-subtract operator.

### Signatures

op:decimal-subtract(xs:decimal $decimal-var1, xs:decimal $decimal-var2) —> xs:decimal

### Arguments

Data Type | Argument | Description
--- | --- | ---
xs:decimal | $decimal-var1 | Represents a decimal number, for example: 1.1.
xs:decimal | $decimal-var2 | Represents a decimal number, for example: 1.1.

### Returns

Returns the decimal value of subtracting $decimal-var2 from $decimal-var1.

### Examples

#### Simple

Invoking decimal-subtract("2.2","1.1") returns the decimal value 1.1 as shown in the following example query:

    <decimal-subtract>{op:decimal-subtract("2.2","1.1")}</decimal-subtract>

The preceding query generates the following result:

    <decimal-subtract>1.1</decimal-subtract>

Related Topics

W3C decimal data type description.

W3C numeric-subtract operator description.