Skip to content

Commit 0885534

Browse files
committed
Mention _Float16 (type from Annex H of the C23) in the struct docs
1 parent 52c0186 commit 0885534

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/struct.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ platform-dependent.
254254
+--------+--------------------------+--------------------+----------------+------------+
255255
| ``N`` | :c:type:`size_t` | integer | | \(3) |
256256
+--------+--------------------------+--------------------+----------------+------------+
257-
| ``e`` | \(6) | float | 2 | \(4) |
257+
| ``e`` | :c:expr:`_Float16` | float | 2 | \(4), \(6) |
258258
+--------+--------------------------+--------------------+----------------+------------+
259259
| ``f`` | :c:expr:`float` | float | 4 | \(4) |
260260
+--------+--------------------------+--------------------+----------------+------------+
@@ -322,7 +322,9 @@ Notes:
322322
revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign
323323
bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored),
324324
and can represent numbers between approximately ``6.1e-05`` and ``6.5e+04``
325-
at full precision. This type is not widely supported by C compilers: on a
325+
at full precision. This type is not widely supported by C compilers:
326+
it's available as :c:expr:`_Float16` type, if the compiler supports the Annex H
327+
of the C23 standard. On a
326328
typical machine, an unsigned short can be used for storage, but not for math
327329
operations. See the Wikipedia page on the `half-precision floating-point
328330
format <half precision format_>`_ for more information.

0 commit comments

Comments
 (0)