# Math

## Add

Takes two values as input and performs an addition. No specification of the data type in order to work for multiple data types (Integer, Float, Double, etc.).

#### Syntax <a href="#pragma-line-2691" id="pragma-line-2691"></a>

```
Add ( Augend , Addend )
```

#### Parameters <a href="#pragma-line-2697" id="pragma-line-2697"></a>

***Augend***\
&#x20;First part of the addition.\
&#x20;Type: Any

***Addend***\
&#x20;Second part of the addition.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2708" id="pragma-line-2708"></a>

Any

## Ceil

This element always rounds up a number, even when used on a negative number

#### Syntax <a href="#pragma-line-2717" id="pragma-line-2717"></a>

```
Ceil ( X )
```

#### Parameters <a href="#pragma-line-2723" id="pragma-line-2723"></a>

***X***\
&#x20;This value receives a double or decimal type\
&#x20;Type: Double

#### Return Type <a href="#pragma-line-2730" id="pragma-line-2730"></a>

Double

## Divide

Divides the Dividend value with the Divisor value No specification of the data type in order to work for multiple data types (Integer, Float, Double, ..).

#### Syntax <a href="#pragma-line-2739" id="pragma-line-2739"></a>

```
Divide ( Dividend , Divisor )
```

#### Parameters <a href="#pragma-line-2745" id="pragma-line-2745"></a>

***Dividend***\
&#x20;First part of the division.\
&#x20;Type: Any

***Divisor***\
&#x20;Second part of the division. Mustn't be zero.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2756" id="pragma-line-2756"></a>

Any

## Increment

Increments the value of a Variable with the given Name.

#### Syntax <a href="#pragma-line-2765" id="pragma-line-2765"></a>

```
Increment ( Name )
```

#### Parameters <a href="#pragma-line-2771" id="pragma-line-2771"></a>

***Name***\
&#x20;Name of the variable which will be incremented.\
&#x20;Type: String

#### Return Type <a href="#pragma-line-2778" id="pragma-line-2778"></a>

Int

## Modulo

Returns the reminder of the division. No specification of the data type in order to work for multiple data types (Integer, Float, Double, ..).

#### Syntax <a href="#pragma-line-2787" id="pragma-line-2787"></a>

```
Modulo ( Dividend , Divisor )
```

#### Parameters <a href="#pragma-line-2793" id="pragma-line-2793"></a>

***Dividend***\
&#x20;First part of the division.\
&#x20;Type: Any

***Divisor***\
&#x20;Second part of the division. Mustn't be zero.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2804" id="pragma-line-2804"></a>

Int

## Multiply

Multiplies two values.

#### Syntax <a href="#pragma-line-2813" id="pragma-line-2813"></a>

```
Multiply ( Multiplicand , Multiplier )
```

#### Parameters <a href="#pragma-line-2819" id="pragma-line-2819"></a>

***Multiplicand***\
&#x20;First factor of the multiplication.\
&#x20;Type: Any

***Multiplier***\
&#x20;Second factor of the multiplication.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2830" id="pragma-line-2830"></a>

Any

## Pow

Returns a specified number raised to the specified power.

#### Syntax <a href="#pragma-line-2839" id="pragma-line-2839"></a>

```
Pow ( X , Y )
```

#### Parameters <a href="#pragma-line-2845" id="pragma-line-2845"></a>

***X***\
&#x20;A double-precision floating-point number to be raised to a power.\
&#x20;Type: Double

***Y***\
&#x20;A double-precision floating-point number that specifies a power.\
&#x20;Type: Double

#### Return Type <a href="#pragma-line-2856" id="pragma-line-2856"></a>

Double

## Round

Rounds a Double or Numeric value to the nearest integer or to the specified number of fractional digits.

#### Syntax

```
Round ( Value [, Digits] [, MidpointRounding] )
```

#### Parameters

***Value***\
A Double or Numeric to be rounded.\
Type: Any

***Digits*** (optional)\
The number of fractional digits in the return value.\
Type: Integer

***MidpointRounding*** (optional)\
The rounding strategy:

* 'ToEven' (default): Rounds to the nearest number, and when a number is halfway between two others, it is rounded toward the nearest even number (IEEE 754).
* 'AwayFromZero': Rounds to the nearest number, and when a number is halfway between two others, it is rounded toward the nearest number that is away from zero (DIN 1333).\
  Type: String

#### Return Type

Double

## Square Root

Returns the square root of a specified number.

#### Syntax <a href="#pragma-line-2891" id="pragma-line-2891"></a>

```
Square Root ( X )
```

#### Parameters <a href="#pragma-line-2897" id="pragma-line-2897"></a>

***X***\
&#x20;The number whose square root is to be found.\
&#x20;Type: Double

#### Return Type <a href="#pragma-line-2904" id="pragma-line-2904"></a>

Double

## Subtract

Takes two values as input and performs a subtraction. No specification of the data type in order to work for multiple data types (Integer, Float, Double, ..).

#### Syntax <a href="#pragma-line-2913" id="pragma-line-2913"></a>

```
Subtract ( Minuend , Subtrahend )
```

#### Parameters <a href="#pragma-line-2919" id="pragma-line-2919"></a>

***Minuend***\
&#x20;First part of the subtraction.\
&#x20;Type: Any

***Subtrahend***\
&#x20;Second part of the subtraction.\
&#x20;Type: Any

#### Return Type <a href="#pragma-line-2930" id="pragma-line-2930"></a>

Any

## &#x20;<a href="#pragma-line-2935" id="pragma-line-2935"></a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tivity.one/building-an-application/execution/scripting/functions/math-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
