This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 33ea1422c42 [doc](float/double) improve docs of float and double types
(#2709)
33ea1422c42 is described below
commit 33ea1422c429df0891d13115ea2ed87b21cceac1
Author: TengJianPing <[email protected]>
AuthorDate: Wed Aug 6 11:39:18 2025 +0800
[doc](float/double) improve docs of float and double types (#2709)
## Versions
- [x] dev
- [ ] 3.0
- [ ] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [x] Checked by AI
- [ ] Test Cases Built
---
.../basic-element/sql-data-types/numeric/DOUBLE.md | 41 ++++++++++++++++++++--
.../basic-element/sql-data-types/numeric/FLOAT.md | 41 ++++++++++++++++++++--
.../basic-element/sql-data-types/numeric/DOUBLE.md | 37 ++++++++++++++++++-
.../basic-element/sql-data-types/numeric/FLOAT.md | 37 ++++++++++++++++++-
4 files changed, 148 insertions(+), 8 deletions(-)
diff --git a/docs/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
b/docs/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
index 05988907660..d22347dec36 100644
--- a/docs/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
+++ b/docs/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
@@ -6,9 +6,44 @@
---
## DOUBLE
-### Description
-DOUBLE
-8-byte floating point number
+## Description
+ DOUBLE
+ 8-byte double-precision floating-point number.
+
+## Value Range
+
+Doris uses IEEE-754 double-precision floating-point numbers, the value range
is:
+
+- -∞ (-Infinity)
+- [-1.79769E+308, -2.225E-307]
+- 0
+- [+2.225E-307, +1.79769E+308]
+- +∞ (+Infinity)
+- NaN (Not a Number)
+
+For details, refer to [C++ double
type](https://en.cppreference.com/w/cpp/language/types.html#Standard_floating-point_types)
and [Wikipedia Double-precision floating-point
format](https://en.wikipedia.org/wiki/Double-precision_floating-point_format).
+
+## Examples
+
+```sql
+create table double_test(f1 int, f2 double) properties("replication_num"="1");
+
+insert into double_test values (0, "-Infinity"), (1, -1.79769E+308), (2,
-2.225E-307), (3, 0), (4, +2.225E-307), (5, +1.79769E+308), (6, "+Infinity"),
(7, "NaN");
+
+select * from double_test order by f1;
++------+---------------+
+| f1 | f2 |
++------+---------------+
+| 0 | -Infinity |
+| 1 | -1.79769e+308 |
+| 2 | -2.225e-307 |
+| 3 | 0 |
+| 4 | 2.225e-307 |
+| 5 | 1.79769e+308 |
+| 6 | Infinity |
+| 7 | NaN |
++------+---------------+
+```
### keywords
DOUBLE
diff --git a/docs/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
b/docs/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
index 7ca747d5ec6..ecfd3b46665 100644
--- a/docs/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
+++ b/docs/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
@@ -6,9 +6,44 @@
---
## FLOAT
-### Description
-FLOAT
-4-byte floating point number
+## Description
+ FLOAT
+ 4-byte single-precision floating-point number.
+
+## Value Range
+
+Doris uses IEEE-754 single-precision floating-point numbers, the value range
is:
+
+- -∞ (-Infinity)
+- [-3.402E+38, -1.175E-37]
+- 0
+- [1.175E-37, 3.402E+38]
+- +∞ (+Infinity)
+- NaN (Not a Number)
+
+For details, refer to [C++ float
type](https://en.cppreference.com/w/cpp/language/types.html#Standard_floating-point_types)
and [Wikipedia Single-precision floating-point
format](https://en.wikipedia.org/wiki/Single-precision_floating-point_format).
+
+## Examples
+
+```sql
+create table float_test(f1 int, f2 float) properties("replication_num"="1");
+
+insert into float_test values(0, "-Infinity"), (1, -3.402E+38), (2,
-1.175E-37), (3, 0), (4, +1.175E-37), (5, +3.402E+38), (6, "+Infinity"), (7,
"NaN");
+
+select * from float_test order by f1;
++------+------------+
+| f1 | f2 |
++------+------------+
+| 0 | -Infinity |
+| 1 | -3.402e+38 |
+| 2 | -1.175e-37 |
+| 3 | 0 |
+| 4 | 1.175e-37 |
+| 5 | 3.402e+38 |
+| 6 | Infinity |
+| 7 | NaN |
++------+------------+
+```
### keywords
FLOAT
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
index aa94bec1bb4..12eedf87505 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/DOUBLE.md
@@ -8,7 +8,42 @@
## DOUBLE
## 描述
DOUBLE
- 8字节浮点数
+ 8字节双精度浮点数。
+
+## 取值范围
+
+Doris使用IEEE-754双精度浮点数,取值范围:
+
+- -∞(负无穷大, -Infinity)
+- [-1.79769E+308, -2.225E-307]
+- 0
+- [+2.225E-307, +1.79769E+308]
+- +∞(正无穷大, +Infinity)
+- NaN(Not a Number)
+
+详情参见[C++ double
类型](https://en.cppreference.com/w/cpp/language/types.html#Standard_floating-point_types)和[Wikipedia双精度浮点数](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)。
+
+## 示例
+
+```sql
+create table double_test(f1 int, f2 double) properties("replication_num"="1");
+
+insert into double_test values (0, "-Infinity"), (1, -1.79769E+308), (2,
-2.225E-307), (3, 0), (4, +2.225E-307), (5, +1.79769E+308), (6, "+Infinity"),
(7, "NaN");
+
+select * from double_test order by f1;
++------+---------------+
+| f1 | f2 |
++------+---------------+
+| 0 | -Infinity |
+| 1 | -1.79769e+308 |
+| 2 | -2.225e-307 |
+| 3 | 0 |
+| 4 | 2.225e-307 |
+| 5 | 1.79769e+308 |
+| 6 | Infinity |
+| 7 | NaN |
++------+---------------+
+```
### keywords
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
index bff8cfc3e28..5b9a49e894f 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/basic-element/sql-data-types/numeric/FLOAT.md
@@ -8,7 +8,42 @@
## FLOAT
## 描述
FLOAT
- 4字节浮点数
+ 4字节单精度浮点数。
+
+## 取值范围
+
+Doris使用IEEE-754单精度浮点数,取值范围:
+
+- -∞(负无穷大, -Infinity)
+- [-3.402E+38, -1.175E-37]
+- 0
+- [1.175E-37, 3.402E+38]
+- +∞(正无穷大, +Infinity)
+- NaN(Not a Number)
+
+详情参见[C++ float
类型](https://en.cppreference.com/w/cpp/language/types.html#Standard_floating-point_types)和[Wikipedia单精度浮点数](https://en.wikipedia.org/wiki/Single-precision_floating-point_format)。
+
+## 示例
+
+```sql
+create table float_test(f1 int, f2 float) properties("replication_num"="1");
+
+insert into float_test values(0, "-Infinity"), (1, -3.402E+38), (2,
-1.175E-37), (3, 0), (4, +1.175E-37), (5, +3.402E+38), (6, "+Infinity"), (7,
"NaN");
+
+select * from float_test order by f1;
++------+------------+
+| f1 | f2 |
++------+------------+
+| 0 | -Infinity |
+| 1 | -3.402e+38 |
+| 2 | -1.175e-37 |
+| 3 | 0 |
+| 4 | 1.175e-37 |
+| 5 | 3.402e+38 |
+| 6 | Infinity |
+| 7 | NaN |
++------+------------+
+```
### keywords
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]