> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/scopeview/use-functions/mathematical-functions.md).

# Mathematical Functions

<table><thead><tr><th width="256.0909118652344">Function</th><th>Description</th></tr></thead><tbody><tr><td><strong>Mathematical | ABS</strong></td><td>Outputs the absolute value of the selected signal.</td></tr><tr><td><strong>Mathematical | CUMSUM</strong></td><td>Outputs the cumulative sum of input over time.</td></tr><tr><td><strong>Mathematical | DERIV</strong></td><td>Outputs the derivative of the input.</td></tr><tr><td><strong>Mathematical | DIFF</strong></td><td>Outputs the difference between two consecutive samples from the input.</td></tr><tr><td><strong>Mathematical | INTEG</strong></td><td>Outputs the integral of the input.</td></tr><tr><td><strong>Mathematical | LOG</strong></td><td>Outputs the natural logarithm of input.</td></tr><tr><td><strong>Mathematical | LOG10</strong></td><td>Outputs logarithm to the base 10 of input.</td></tr><tr><td><strong>Mathematical | MAX</strong></td><td>Outputs the maximum value of the input.</td></tr><tr><td><strong>Mathematical | MOY</strong></td><td>Outputs the average value of the input.</td></tr><tr><td><strong>Mathematical | MIN</strong></td><td>Outputs the minimum value of the input.</td></tr><tr><td><strong>Mathematical | NEG</strong></td><td>Outputs the negative values.</td></tr><tr><td><strong>Mathematical | PHASEDIFF</strong></td><td>Outputs the absolute difference between the two phases.</td></tr><tr><td><strong>Mathematical | PHASESHIFT</strong></td><td>Outputs the phase difference between two vectors in degrees.</td></tr><tr><td><strong>Mathematical | POS</strong></td><td>Outputs the positive values of input.</td></tr><tr><td><strong>Mathematical | PROD</strong></td><td>Outputs the product of all signal values.</td></tr><tr><td><strong>Mathematical | RMS</strong></td><td>Outputs the root mean square of the input signal.</td></tr><tr><td><strong>Mathematical | SIGN</strong></td><td>Outputs the sign of the input.</td></tr><tr><td><strong>Mathematical | SQRT</strong></td><td>Outputs the square root of input.</td></tr><tr><td><strong>Mathematical | STAIR</strong></td><td>Generates discrete stairs at regular intervals.</td></tr><tr><td><strong>Mathematical | SUM</strong></td><td>Outputs the sum of all samples of input.</td></tr><tr><td><strong>Mathematical | WAVG</strong></td><td>Outputs the moving average of the input signal.</td></tr><tr><td><strong>Mathematical | WMAX</strong></td><td>Outputs the moving maximum of the input signal.</td></tr><tr><td><strong>Mathematical | WMIN</strong></td><td>Outputs the moving minimum of the input signal.</td></tr><tr><td><strong>Mathematical | WRMS</strong></td><td>Outputs the moving RMS of the input signal.</td></tr><tr><td><strong>Mathematical | WSUM</strong></td><td>Outputs the moving sum of the input signal.</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 by asking a question.

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

```
GET https://www.opal-rt.com/docs/scopeview/use-functions/mathematical-functions.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.
