> ## Documentation Index
> Fetch the complete documentation index at: https://docs.engrate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Function

> Available Functions

Functions are the building blocks that define [Calculation Pipelines](/api-reference/cost-of-energy/calculation-pipeline), a domain-specific algebra for computer-readable cost calculations.

Functions are represented as a [tagged union](https://en.wikipedia.org/wiki/Tagged_union), using the field `type` which every function contains.
Anywhere a function is accepted you may find any of the functions listed here, and you tell them apart using the value of the `type` field.

| Function                                                       | Tag         | Description                                                      |
| -------------------------------------------------------------- | ----------- | ---------------------------------------------------------------- |
| [Constant](/api-reference/cost-of-energy/functions/constant)   | `constant`  | Emit a constant value at a given resolution.                     |
| [Add](/api-reference/cost-of-energy/functions/add)             | `add`       | Sum two or more operands.                                        |
| [Subtract](/api-reference/cost-of-energy/functions/subtract)   | `subtract`  | Compute left - right.                                            |
| [Divide](/api-reference/cost-of-energy/functions/divide)       | `divide`    | Compute numerator / denominator with unit algebra.               |
| [Multiply](/api-reference/cost-of-energy/functions/multiply)   | `multiply`  | Multiply two operands with unit algebra.                         |
| [Aggregate](/api-reference/cost-of-energy/functions/aggregate) | `aggregate` | Aggregate a dataset over a coarser resolution window.            |
| [Resample](/api-reference/cost-of-energy/functions/resample)   | `resample`  | Resample a coarse-resolution series to finer resolution.         |
| [Select](/api-reference/cost-of-energy/functions/select)       | `select`    | Keep only values matching a condition (temporal or value-based). |
| [Mask](/api-reference/cost-of-energy/functions/mask)           | `mask`      | Conditional substitution based on a condition.                   |
| [Clip](/api-reference/cost-of-energy/functions/clip)           | `clip`      | Clamp values to a min/max range.                                 |
| [Lookup](/api-reference/cost-of-energy/functions/lookup)       | `lookup`    | Tier-based table lookup.                                         |
