Skip to content
Merged
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,54 @@
---
{
"title": "COT",
"language": "en"
}
---

## Description

Returns the cotangent of x, where x is the value in radians, only input and output are supported as double. Input null value will return null value.

## Syntax

```sql
COT(<x>)
```

## Parameters

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

## Return Value

Returns a Double type value means the cotangent of x.

## Example

```sql
select cot(1),cot(2),cot(1000);
```

```text
+--------------------+----------------------+--------------------+
| cot(1) | cot(2) | cot(1000) |
+--------------------+----------------------+--------------------+
| 0.6420926159343306 | -0.45765755436028577 | 0.6801221323348698 |
+--------------------+----------------------+--------------------+
```

Input null value.

```sql
select cot(null);
```

```text
+--------------------+
| cot(null) |
+--------------------+
| NULL |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
{
"title": "CSC",
"language": "en"
}
---

## Description

Returns the cosecant of x, where x is the value in radians, only input and output are supported as double. Input null value will return null value.

## Syntax

```sql
CSC(<x>)
```

## Parameters

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

## Return Value

Returns a Double type value means the cosecant of x.

## Example

```sql
select csc(1),csc(2),csc(1000);
```

```text
+--------------------+--------------------+------------------+
| csc(1) | csc(2) | csc(1000) |
+--------------------+--------------------+------------------+
| 1.1883951057781212 | 1.0997501702946164 | 1.20936599707935 |
+--------------------+--------------------+------------------+
```

Input null value.

```sql
select csc(null);
```

```text
+--------------------+
| csc(null) |
+--------------------+
| NULL |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
{
"title": "SEC",
"language": "en"
}
---

## Description

Returns the secant of x, where x is the value in radians, only input and output are supported as double. Input null value will return null value.

## Syntax

```sql
SEC(<x>)
```

## Parameters

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

## Return Value

Returns a Double type value means the secant of x.

## Example

```sql
select sec(1),sec(2),sec(1000);
```

```text
+--------------------+--------------------+--------------------+
| sec(1) | sec(2) | sec(1000) |
+--------------------+--------------------+--------------------+
| 1.8508157176809255 | -2.402997961722381 | 1.7781600385912715 |
+--------------------+--------------------+--------------------+
```

Input null value.

```sql
select sec(null);
```

```text
+--------------------+
| sec(null) |
+--------------------+
| NULL |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
{
"title": "COT",
"language": "zh-CN"
}
---

## 描述

返回 x 的余切值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。

## 语法

```sql
COT(<x>)
```

## 参数

| 参数 | 说明 |
| -- | -- |
| `<x>` | 需要被计算余切值的值 |

## 返回值

返回一个 Double 类型的值表示 x 的余切值。

## 举例

```sql
select cot(1),cot(2),cot(1000);
```

```text
+--------------------+----------------------+--------------------+
| cot(1) | cot(2) | cot(1000) |
+--------------------+----------------------+--------------------+
| 0.6420926159343306 | -0.45765755436028577 | 0.6801221323348698 |
+--------------------+----------------------+--------------------+
```


输入null值。

```sql
select cot(null);
```

```text
+--------------------+
| cot(null) |
+--------------------+
| NULL |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
{
"title": "CSC",
"language": "zh-CN"
}
---

## 描述

返回 x 的余割值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。

## 语法

```sql
CSC(<x>)
```

## 参数

| 参数 | 说明 |
| -- | -- |
| `<x>` | 需要被计算余割值的值 |

## 返回值

返回一个 Double 类型的值表示 x 的余割值。

## 举例

```sql
select csc(1),csc(2),csc(1000);
```

```text
+--------------------+--------------------+------------------+
| csc(1) | csc(2) | csc(1000) |
+--------------------+--------------------+------------------+
| 1.1883951057781212 | 1.0997501702946164 | 1.20936599707935 |
+--------------------+--------------------+------------------+
```

输入null值。

```sql
select csc(null);
```

```text
+--------------------+
| csc(null) |
+--------------------+
| NULL |
+--------------------+
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
{
"title": "SEC",
"language": "zh-CN"
}
---

## 描述

返回 x 的正割值,x 为弧度值,仅支持输入输出为double。输入null值时会返回null。

## 语法

```sql
SEC(<x>)
```

## 参数

| 参数 | 说明 |
| -- | -- |
| `<x>` | 需要被计算正割值的值 |

## 返回值

返回一个 Double 类型的值表示 x 的正割值。

## 举例

```sql
select sec(1),sec(2),sec(1000);
```

```text
+--------------------+--------------------+--------------------+
| sec(1) | sec(2) | sec(1000) |
+--------------------+--------------------+--------------------+
| 1.8508157176809255 | -2.402997961722381 | 1.7781600385912715 |
+--------------------+--------------------+--------------------+
```

输入null值。

```sql
select sec(null);
```

```text
+--------------------+
| sec(null) |
+--------------------+
| NULL |
+--------------------+
```
4 changes: 4 additions & 0 deletions sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,8 @@
"sql-manual/sql-functions/scalar-functions/numeric-functions/conv",
"sql-manual/sql-functions/scalar-functions/numeric-functions/cos",
"sql-manual/sql-functions/scalar-functions/numeric-functions/cosh",
"sql-manual/sql-functions/scalar-functions/numeric-functions/cot",
"sql-manual/sql-functions/scalar-functions/numeric-functions/csc",
"sql-manual/sql-functions/scalar-functions/numeric-functions/degrees",
"sql-manual/sql-functions/scalar-functions/numeric-functions/e",
"sql-manual/sql-functions/scalar-functions/numeric-functions/exp",
Expand All @@ -1125,6 +1127,7 @@
"sql-manual/sql-functions/scalar-functions/numeric-functions/random",
"sql-manual/sql-functions/scalar-functions/numeric-functions/round",
"sql-manual/sql-functions/scalar-functions/numeric-functions/round-bankers",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sec",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sign",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sin",
"sql-manual/sql-functions/scalar-functions/numeric-functions/sinh",
Expand Down Expand Up @@ -1320,6 +1323,7 @@
"sql-manual/sql-functions/scalar-functions/date-time-functions/year",
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-ceil",
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-floor",
"sql-manual/sql-functions/scalar-functions/date-time-functions/year-of-week",
"sql-manual/sql-functions/scalar-functions/date-time-functions/yearweek",
"sql-manual/sql-functions/scalar-functions/date-time-functions/years-add",
"sql-manual/sql-functions/scalar-functions/date-time-functions/years-diff",
Expand Down
Loading