# op:decimal-add

Add $decimal-var1 to $decimal-var2. The + operator invokes the decimal-add operator.

### Signatures

op:decimal-add(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 adding $decimal-var1 to $decimal-var2.

### Examples

#### Simple

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

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

The preceding query generates the following result:

    <decimal-add>3.3</decimal-add>

Related Topics

W3C decimal data type description.

W3C numeric-add operator description.