> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/functions/sinh.md).

# sinh

Use the `sinh()` function to calculate the hyperbolic sine of a numeric value.

## Syntax

```sql
sinh(<number>)
```

## Parameters

| Name     | Type           | Required | Description                                                                             |
| -------- | -------------- | -------- | --------------------------------------------------------------------------------------- |
| `number` | integer, float | Yes      | The numeric value for which to calculate the hyperbolic sine. Any real number is valid. |

## Returns

**Type**: float

**Description**: The `sinh()` function returns the hyperbolic sine of the input value. If the input is `null`, the function returns `null`.

## Usage notes

* **Input type**: XQL doesn't support NaN or infinite values as input and these value types also can not be returned.
* **Valid Input Range**: The `sinh()` function accepts any real number as input.
* **Null Handling**: If the input expression is `null`, the function returns `null`.
* **Symmetry**: The function is odd, meaning `sinh(-x) = -sinh(x)`.
* **Identity Value**: `sinh(0)` always returns `0.0`.
* **Definition**: The hyperbolic sine is defined as `(e^x - e^(-x)) / 2`.
* **Overflow**: For very large input values, the result may overflow to infinity.
* **Common Use Cases**: This function is typically used within the `alter` stage for mathematical modeling, catenary curve calculations, and scientific computations.

## Examples

### Example 1: Calculate hyperbolic sine of literal values

**Goal**: Calculate the hyperbolic sine for specific numeric literals to verify known mathematical results.

**XQL code**:

```sql
dataset = xdr_data
| limit 1
| alter result1 = sinh(0), result2 = sinh(1), result3 = sinh(-1)
| fields result1, result2, result3
```

**Explanation**: `sinh(0)` returns `0.0`. `sinh(1)` returns approximately `1.1752`, and `sinh(-1)` returns approximately `-1.1752`, demonstrating the odd symmetry of the function.

**Output**:

| RESULT1 | RESULT2 | RESULT3  |
| ------- | ------- | -------- |
| 0.0     | 1.17520 | -1.17520 |

### Example 2: Calculate hyperbolic sine from a field value

**Goal**: Calculate the hyperbolic sine of values stored in a dataset field.

**XQL code**:

```sql
config timeframe = 1d
| dataset = sample_xql_raw
| alter sinh_result = sinh(duration_seconds)
| fields event_id, duration_seconds, sinh_result
| limit 3
```

**Explanation**: This query computes the hyperbolic sine for each value in the `duration_seconds` field. No filtering is needed since `sinh()` accepts any real number.

**Output**:

| EVENT\_ID | DURATION\_SECONDS | SINH\_RESULT |
| --------- | ----------------- | ------------ |
| 101       | 0.0               | 0.0          |
| 102       | 1.0               | 1.17520      |
| 103       | 2.0               | 3.62686      |

### Example 3: Verify relationship between sinh and asinh

**Goal**: Demonstrate that `asinh()` is the inverse of `sinh()` by applying both functions sequentially.

**XQL code**:

```sql
config timeframe = 1d
| dataset = sample_xql_raw
| alter sinh_val = sinh(duration_seconds)
| alter asinh_sinh_val = asinh(sinh_val)
| fields event_id, duration_seconds, sinh_val, asinh_sinh_val
| limit 3
```

**Explanation**: This query first computes `sinh()` of `duration_seconds`, then applies `asinh()` to the result. The final value should match the original `duration_seconds`, confirming the inverse relationship.

**Output**:

| EVENT\_ID | DURATION\_SECONDS | SINH\_VAL | ASINH\_SINH\_VAL |
| --------- | ----------------- | --------- | ---------------- |
| 101       | 1.0               | 1.17520   | 1.0              |
| 102       | 2.0               | 3.62686   | 2.0              |
| 103       | 3.0               | 10.01787  | 3.0              |

## Related articles

* **Stages**: [`alter`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/stages/alter.md), [`fields`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/stages/fields.md), [`limit`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/stages/limit.md)
* **Functions**: [`asinh`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/functions/asinh.md), [`cosh`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/functions/cosh.md), [`tanh`](https://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/functions/tanh.md)


---

# 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://cortex-docs.paloaltonetworks.com/xql-command-reference-guide/readme/functions/sinh.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.
