Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mention _Float16 (type from Annex H of the C23) in the struct docs#146243

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
skirpichev wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromskirpichev:use-Float16-in-docs
Open
Show file tree
Hide file tree
Changes fromall 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
1 change: 1 addition & 0 deletionsDoc/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -177,6 +177,7 @@
('c:type','__int64'),
('c:type','unsigned __int64'),
('c:type','double'),
('c:type','_Float16'),
# Standard C structures
('c:struct','in6_addr'),
('c:struct','in_addr'),
Expand Down
6 changes: 4 additions & 2 deletionsDoc/library/struct.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -254,7 +254,7 @@ platform-dependent.
+--------+--------------------------+--------------------+----------------+------------+
| ``N`` | :c:type:`size_t` | integer | | \(3) |
+--------+--------------------------+--------------------+----------------+------------+
| ``e`` |\(6)| float | 2 | \(4) |
| ``e`` |:c:expr:`_Float16` | float | 2 | \(4), \(6) |
+--------+--------------------------+--------------------+----------------+------------+
| ``f`` | :c:expr:`float` | float | 4 | \(4) |
+--------+--------------------------+--------------------+----------------+------------+
Expand DownExpand Up@@ -322,7 +322,9 @@ Notes:
revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign
bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored),
and can represent numbers between approximately ``6.1e-05`` and ``6.5e+04``
at full precision. This type is not widely supported by C compilers: on a
at full precision. This type is not widely supported by C compilers:
it's available as :c:expr:`_Float16` type, if the compiler supports the Annex H
of the C23 standard. On a
typical machine, an unsigned short can be used for storage, but not for math
operations. See the Wikipedia page on the `half-precision floating-point
format <half precision format_>`_ for more information.
Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp