Skip to content

Commit 0602a5f

Browse files
authored
Add note concerning subnormal numbers (#341)
1 parent 657a8f4 commit 0602a5f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Diff for: spec/API_specification/data_types.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,19 @@ IEEE 754 single-precision (32-bit) binary floating-point number (see IEEE 754-20
5050

5151
IEEE 754 double-precision (64-bit) binary floating-point number (see IEEE 754-2019).
5252

53+
```{note}
54+
IEEE 754-2019 requires support for subnormal (a.k.a., denormal) numbers, which are useful for supporting gradual underflow. However, hardware support for subnormal numbers is not universal, and many platforms (e.g., accelerators) and compilers support toggling denormals-are-zero (DAZ) and/or flush-to-zero (FTZ) behavior to increase performance and to guard against timing attacks.
55+
56+
Accordingly, subnormal behavior is left unspecified and, thus, implementation-defined. Conforming implementations may vary in their support for subnormal numbers.
57+
```
5358

5459
:::{admonition} Future extension
5560
:class: hint
56-
`complex64` and `complex128` dtypes are expected to be included in the next
61+
`complex64` and `complex128` data types are expected to be included in the next
5762
version of this standard and to have the following casting rules (will be added
5863
to {ref}`type-promotion`):
5964

60-
![Type promotion diagram for complex dtypes in next version](/_static/images/dtype_promotion_complex.png)
65+
![Type promotion diagram for complex data types in next version](/_static/images/dtype_promotion_complex.png)
6166

6267
See [array-api/issues/102](https://github.com/data-apis/array-api/issues/102)
6368
for more details.
@@ -132,7 +137,7 @@ The default data types should be clearly defined in a conforming library's docum
132137
For the purpose of organizing functions within this specification, the following data type categories are defined.
133138

134139
```{note}
135-
Conforming libraries are not required to organize dtypes according to these categories. These
140+
Conforming libraries are not required to organize data types according to these categories. These
136141
categories are only intended for use within this specification.
137142
```
138143

@@ -144,7 +149,7 @@ complex data types.
144149
### Numeric Data Types
145150

146151
`int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `uint32`,
147-
`uint64`, `float32`, and `float64` (i.e., all dtypes except for `bool`).
152+
`uint64`, `float32`, and `float64` (i.e., all data types except for `bool`).
148153

149154
### Integer Data Types
150155

0 commit comments

Comments
 (0)