# 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)

---
title: tanh
latest-operator-version: v26.2.1
latest-console-tag: v3.10.0
latest-connect-version: 4.104.0
latest-redpanda-tag: v26.2.1
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"
---

<!-- 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)Syntax

```sql
TANH(x)
```

## [](#arguments)Arguments

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


## [](#return-type)Return type

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

## [](#examples)Examples

### [](#positive-value)Positive value

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

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

### [](#negative-value)Negative value

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

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

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

### [](#zero)Zero

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

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