Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] suppor the trigonometric math function docs, like sinh, asinh, acosh and atanh #2141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
{
"title": "ACOSH",
"language": "en"
}
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## Description

Returns the hyperbolic arc cosine of `x`, or `NULL` if `x` is less than `1`.

## Syntax

```sql
ACOSH(<x>)
```

## Parameters

| Parameter | Description |
| -- | -- |
| `<x>` | The value for which the hyperbolic arc cosine value is to be calculated |

## Return Value

The acosh value of parameter `x`.

## Example

```sql
select acosh(0.0);
```

```sql
+------------+
| acosh(0.0) |
+------------+
| NULL |
+------------+
```

```sql
select acosh(-1.0);
```

```sql
+-------------+
| acosh(-1.0) |
+-------------+
| NULL |
+-------------+
```

```sql
select acosh(1.0);
```

```sql
+------------+
| acosh(1.0) |
+------------+
| 0 |
+------------+
```

```sql
select acosh(10.0);
```

```sql
+-------------------+
| acosh(10.0) |
+-------------------+
| 2.993222846126381 |
+-------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
{
"title": "ASINH",
"language": "en"
}
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## Description

Returns the hyperbolic arc sine of `x`.

## Syntax

```sql
ASINH(<x>)
```

## Parameters

| Parameter | Description |
| -- | -- |
| `<x>` | The value for which the hyperbolic arc sine value is to be calculated |

## Return Value

The asinh value of parameter `x`.

## Example

```sql
select asinh(0.0);
```

```sql
+------------+
| asinh(0.0) |
+------------+
| 0 |
+------------+
```

```sql
select asinh(1.0);
```

```sql
+-------------------+
| asinh(1.0) |
+-------------------+
| 0.881373587019543 |
+-------------------+
```

```sql
select asinh(-1.0);
```

```sql
+--------------------+
| asinh(-1.0) |
+--------------------+
| -0.881373587019543 |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
{
"title": "ATANH",
"language": "en"
}
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## Description

Returns the hyperbolic arc tangent of `x`, or `NULL` if `x` is not in the range `-1` to `1`(excluding `-1` and `1`).

## Syntax

```sql
ATANH(<x>)
```

## Parameters

| Parameter | Description |
| -- | -- |
| `<x>` | The value for which the hyperbolic arc tangent value is to be calculated |

## Return Value

The atanh value of parameter `x`.

## Example

```sql
select atanh(1.0);
```

```sql
+------------+
| atanh(1.0) |
+------------+
| NULL |
+------------+
```

```sql
select atanh(1.0);
```

```sql
+-------------+
| atanh(-1.0) |
+-------------+
| NULL |
+-------------+
```

```sql
select atanh(1.0);
```

```sql
+------------+
| atanh(0.0) |
+------------+
| 0 |
+------------+
```

```sql
select atanh(1.0);
```

```sql
+--------------------+
| atanh(0.5) |
+--------------------+
| 0.5493061443340548 |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
{
"title": "SINH",
"language": "en"
}
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

## Description

Returns the hyperbolic sine of `x`.

## Syntax

```sql
SINH(<x>)
```

## Parameters

| Parameter | Description |
| -- | -- |
| `<x>` | The value for which the hyperbolic sine value is to be calculated |

## Return Value

The sinh value of parameter `x`.

## Example

```sql
select sinh(0.0);
```

```
+-----------+
| sinh(0.0) |
+-----------+
| 0 |
+-----------+
```

```sql
select sinh(1.0);
```

```
+--------------------+
| sinh(1.0) |
+--------------------+
| 1.1752011936438014 |
+--------------------+
```

```sql
select sinh(-1.0);
```

```
+---------------------+
| sinh(-1.0) |
+---------------------+
| -1.1752011936438014 |
+---------------------+
```
Loading