> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/reference-1/functions-and-operators/functions/mathematical.md).

# Mathematical

This section describes the following mathematical functions:

<table><thead><tr><th width="222">Function</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/CZQeAfNsYe9FpfvOq4ZD">ABS</a></td><td>Computes the absolute value of a number</td></tr><tr><td><a href="/pages/11SnVzNYa8nRIt0cJvya">CBRT</a></td><td>Computes the cube root of a number</td></tr><tr><td><a href="/pages/YuREniTMs2peXbTj0TPy">CEIL</a></td><td>Rounds a number up to the nearest integer</td></tr><tr><td><a href="/pages/Yib0yt2S09iaKfPbpZFQ">CEILING</a></td><td>Rounds a number up to the nearest integer</td></tr><tr><td><a href="/pages/FqUKGlRcua5cyudbqwOn">DEGREES</a></td><td>Converts the specified radians to degrees</td></tr><tr><td><a href="/pages/5svzw3GvIM4xNdxv8Ttf">EXP</a></td><td>Computes Euler’s number raised to a certain power</td></tr><tr><td><a href="/pages/4giBu9zoLs3mNorIEFXO">FLOOR</a></td><td>Rounds a number down to the nearest integer</td></tr><tr><td><a href="/pages/D6ljoyct2LqgyQhxiAAJ">GET_SHARD_NUMBER</a></td><td>Returns the shard number of the output/lookup table</td></tr><tr><td><a href="/pages/nyvNEiEFT6sE4opVPQV3">LN</a></td><td>Returns the natural logarithm of a number</td></tr><tr><td><a href="/pages/o2BDuUiJ5dYGMwhSfvlJ">LOG</a></td><td>Return the logarithm of x to the given base</td></tr><tr><td><a href="/pages/yCuQN3WMCn2vGHorWjsV">LOG2</a></td><td>Returns the base 2 logarithm of x</td></tr><tr><td><a href="/pages/thOtTeHxGTezOeNcGljb">LOG10</a></td><td>Returns the base 10 logarithm of x</td></tr><tr><td><a href="/pages/ZT6IFBVNtQyFfSDGlBaJ">MOD</a></td><td>Returns the modulus (remainder) of one number divided by another</td></tr><tr><td><a href="/pages/jvRxonRHtUtRCdF5CkM4">MODULO</a></td><td>Returns the remainder of the first number divided by the second</td></tr><tr><td><a href="/pages/gard5qyU14Wj0442ETkb">POW</a></td><td>Raises one number to the power of another</td></tr><tr><td><a href="/pages/Ip0rmRt8zI7Gxp731lVh">POWER</a></td><td>Raises one number to the power of another</td></tr><tr><td><a href="/pages/FtowWKApKNmrcbOLJTpJ">RADIANS</a></td><td>Converts an angle in degrees to radians</td></tr><tr><td><a href="/pages/qI9w1V9MYDAiOkoZCsog">RAND</a></td><td>Returns a pseudo-random value in the range 0.0 &#x3C;= x &#x3C; 1.0</td></tr><tr><td><a href="/pages/UDOZFVt1Y3EZiNov3mvQ">RANDOM</a></td><td>Returns a pseudo-random value in the range 0.0 &#x3C;= x &#x3C; 1.0</td></tr><tr><td><a href="/pages/fsWobcGdK8TMmUuBXqCa">RECIPROCAL</a></td><td>Returns the reciprocal of the value (¹/ₓ)</td></tr><tr><td><a href="/pages/Q7hv2RC0Zv7Fe1wwQm3i">ROUND</a></td><td>Rounds a number to the nearest integer or to a specified number of decimal places</td></tr><tr><td><a href="/pages/q7SFanuiRRbVX4yEn4hn">SIGN</a></td><td>Returns the signum function of a number</td></tr><tr><td><a href="/pages/JepVNvb2K7vtwdn8pHub">SORT_VALUES</a></td><td>Returns the values sorted in numerical order</td></tr><tr><td><a href="/pages/NuLTieoTdqiWoXIKldBx">SQRT</a></td><td>Computes the square root of a number</td></tr><tr><td><a href="/pages/o9hkJA7sza2KmEppKvn2">TRUNCATE</a></td><td>Returns a number truncated to an integer or to a specified number of decimal places</td></tr></tbody></table>


---

# 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 dynamically by asking a question.

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

```
GET https://upsolver.gitbook.io/content/reference-1/functions-and-operators/functions/mathematical.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
