# Arithmetic Operators

## Arithmetic operators

* `+` (addition)
* `-` (subtraction)
* `*` (multiplication)
* `/` (division)
* `^` ([Exponentiation](https://en.wikipedia.org/wiki/Exponentiation))

Also, you can use `(` and `)` to make groups in maths formula. Example: `(2+3)*3` results in 15, but `2+3*3` results in 18

## Maths functions

* `floor(variable)`
* `ceil(variable)`
* `round(variable, precision)`
* `min(var1, var2, ...)`
* `minpositiveorzero(var1, var2, ...)`
* `max(var1, var2, ...)`
* `average(var1, var2, ...)`
* `sum(var1, var2, ...)`
* `rangesum(var1, var2, step)`
* `power(var1, var2)`
* `pi()`
* `mod(var1, var2)`

Some examples of using these math functions:

1\) example of using `min()` function

```
min({uni_cpo_width}, {uni_cpo_height})
```

The result of the function above will be whatever variable has bigger value. For instance, if width equal to 10 and height is equal to 5, than the result will be 10.

1\) example of using `rangesum()` function

```
rangesum({uni_cpo_start}, {uni_cpo_end}, 1)
```

The result of the function above will be the sum of numbers with a given step. For instance, if start equal to 5 and end is equal to 7 and step is 1, than the result will be 5+6+7=18. Another example, if start equal to 0 and end is equal to 30 and step is 10, than the result will be 0+10+20+30=60.


---

# 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://kb.moomoo.agency/uni-cpo-4-documentation/usage/arithmetic-operators.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.
