---
title: tanh
page-cloud: true
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.118.0
latest-redpanda-tag: v26.2.7
docname: sql/sql-functions/math-functions/tanh
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/math-functions/tanh.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/math-functions/tanh.adoc
description: The `tanh()` function returns the hyperbolic tangent of a specified numeric argument.
page-topic-type: reference
page-git-created-date: "2026-08-03"
page-git-modified-date: "2026-08-03"
page-generated-content: none
---

# tanh

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/math-functions/tanh.md -->

The `tanh()` function returns the hyperbolic tangent of a specified numeric argument.

## Syntax

```sql
TANH(x)
```

## Arguments

-   `x`: A number of type `real` or `double precision`, including zero.


## Return type

Same as the input type (`real` or `double precision`).

## Examples

### Positive value

```sql
SELECT TANH(1);
```

```sql
        tanh
--------------------
 0.7615941559557649
(1 row)
```

### Negative value

`TANH(-x)` returns the negative of `TANH(x)`:

```sql
SELECT TANH(-1);
```

```sql
        tanh
---------------------
 -0.7615941559557649
(1 row)
```

### Zero

```sql
SELECT TANH(0);
```

```sql
 tanh
------
    0
(1 row)
```