> For the complete documentation index, see [llms.txt](https://dev.ubidots.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ubidots.com/synthetic-variables/expressions/mathematical.md).

# Mathematical

The following functions are supported in Synthetic Variables mathematical expressions. These functions receive a variable's time-series data as arguments.

<table><thead><tr><th width="424.3379790940767" align="center">Syntax</th><th align="center">Description</th></tr></thead><tbody><tr><td align="center"><span class="math">ceil(x)</span></td><td align="center">Returns the smallest integer greater than or equal to each element in the variable <code>x</code>. The <code>ceil</code> function always rounds up to the nearest integer.</td></tr><tr><td align="center"><span class="math">floor(x)</span></td><td align="center">Returns the largest integer less than or equal to <code>x</code>.</td></tr><tr><td align="center"><span class="math">round(x, n)</span></td><td align="center">Returns each element in the variable <code>x</code> rounded to <code>n</code> digits after the decimal point. By default, <code>n</code> is 2 in Ubidots.</td></tr><tr><td align="center"><span class="math">sin(x)</span></td><td align="center">Returns the sine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">cos(x)</span></td><td align="center">Returns the cosine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">tan(x)</span></td><td align="center">Returns the tangent of each element in the variable <code>x</code>, where <code>x</code> is in radians.</td></tr><tr><td align="center"><span class="math">arcsin(x)</span></td><td align="center">Returns the inverse sine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arccos(x)</span></td><td align="center">Returns the inverse cosine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arctan(x)</span></td><td align="center">Returns the inverse tangent, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arctan2(x, y)</span></td><td align="center">Returns the inverse tangent, in radians, using the input variables <code>x</code> and <code>y</code> as Cartesian coordinates. <strong>Note:</strong> It only performs the operation on values with the same timestamp.</td></tr><tr><td align="center"><span class="math">sinh(x)</span></td><td align="center">Returns the hyperbolic sine of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">cosh(x)</span></td><td align="center">Returns the hyperbolic cosine of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">tanh(x)</span></td><td align="center">Returns the hyperbolic tangent of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arcsinh(x)</span></td><td align="center">Returns the inverse hyperbolic sine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arccosh(x)</span></td><td align="center">Returns the inverse hyperbolic cosine, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">arctanh(x)</span></td><td align="center">Returns the inverse hyperbolic tangent, in radians, of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">poly(x, c1, c2, c3...)</span></td><td align="center">Returns the result of a polynomial expression of order <span class="math">n</span>, where <span class="math">n</span> is the number of constants minus 1, for each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">exp(x)</span></td><td align="center">Returns the exponential of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">log(x, base)</span></td><td align="center">Returns the logarithm of each element in the variable <code>x</code>. By default, the base is Euler's number.</td></tr><tr><td align="center"><span class="math">abs(x)</span></td><td align="center">Returns the absolute value of each element in the variable <code>x</code>.</td></tr><tr><td align="center"><span class="math">sqrt(x)</span></td><td align="center">Returns the square root of each element in the variable <code>x</code>.</td></tr></tbody></table>

`x` and `y` represent variables as [time series or `dots`](https://docs.ubidots.com/v1.6/reference/time-series).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.ubidots.com/synthetic-variables/expressions/mathematical.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
