# IEEE 754

**IEEE 754** 是浮点运算的一项技术标准，于1985年首次发布，当时名为《IEEE 二进制浮点运算标准》，目前以 IEEE 754-2019《IEEE 浮点运算标准》的形式维护。该标准规定了计算机编程环境中二进制与十进制浮点运算的交换格式、算术格式及方法，以及异常条件及其默认处理方式。<sup>[1](https://standards.ieee.org/ieee/754/6210/)</sup> 符合该标准的实现可以完全由软件实现，也可以完全由硬件实现，或由两者以任意组合实现；对于标准规范性部分中的运算，数值结果与异常均由输入值、运算序列和目标格式唯一确定，而这一切都在用户控制之下。<sup>[1](https://standards.ieee.org/ieee/754/6210/)</sup>

| 关键事实 | 详情 |
|---|---|
| 当前版本 | IEEE 754-2019，由 IEEE 标准委员会于2019年6月13日批准，2019年7月发布；是对 IEEE 754-2008 的小幅修订<sup>[2](https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/)</sup> |
| 第一版 | 1985年获批为 IEEE 标准；1989年被采纳为国际标准 ISO/IEC 60559<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> |
| 基本二进制格式 | 单精度：总共32位中具有24位有效数精度；双精度：总共64位中具有53位有效数精度<sup>[4](https://docs.oracle.com/cd/E19422-01/819-3693/ncg_math.html)</sup> |
| 扩展格式 | 单精度扩展与双精度扩展；双精度扩展要求有效数精度至少64位，总位数至少79位<sup>[4](https://docs.oracle.com/cd/E19422-01/819-3693/ncg_math.html)</sup> |
| 起源 | 1978年起由加州大学伯克利分校的教师与学生起草；卡汉-库南-斯通（KCS）提案成为分委员会的关注焦点<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> |
| 显著特征 | 正确舍入、渐进下溢（非规格化数）、NaN 与无穷大、带符号零，以及不停机的默认异常处理<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> |
| 国际地位 | ISO/IEC 60559:2020，第1版，2020年5月发布，74页，取代已撤销的 ISO/IEC/IEEE 60559:2011<sup>[5](https://www.iso.org/standard/80985.html)</sup> |

## 标准规定了什么

该标准定义了浮点数格式、基本算术运算的结果、舍入规则以及异常处理。<sup>[6](https://ieeemilestones.ethw.org/w/images/8/84/Accuracy_and_Stability_Chapter_2.pdf)</sup> 1985年发布的第一版定义了基本形式与扩展形式的浮点格式；加、减、乘、除、平方根、余数、比较等运算；整数与浮点格式之间、不同浮点格式之间、以及基本格式浮点数到十进制字符串的转换；此外还有浮点异常及其处理，以及非数。<sup>[1](https://standards.ieee.org/ieee/754/6210/)</sup>

1985年的文本还涵盖了无穷大算术、涉及 NaN（非数）的运算、符号位，以及五类异常：无效运算、除以零、上溢、下溢和不精确。<sup>[7](https://ieeemilestones.ethw.org/w/images/d/d9/Ieee754-1985.pdf)</sup> 其设计原则是：标准应鼓励专家开发稳健、高效且可移植的数值程序，使算术异常能够得到处理，并为超越函数和极高精度算术的发展提供条件。<sup>[6](https://ieeemilestones.ethw.org/w/images/8/84/Accuracy_and_Stability_Chapter_2.pdf)</sup>

## 格式与舍入

原标准的两种基本二进制格式是单精度（总共32位中具有24位有效数）和双精度（总共64位中具有53位有效数）。<sup>[4](https://docs.oracle.com/cd/E19422-01/819-3693/ncg_math.html)</sup> 标准还规定了两类扩展格式——单精度扩展和双精度扩展——但未规定其确切尺寸；不过，任何双精度扩展格式的有效数精度不得少于64位，总位数至少为79位。<sup>[4](https://docs.oracle.com/cd/E19422-01/819-3693/ncg_math.html)</sup> x86 系列就实现了这样一种80位扩展双精度格式。<sup>[8](https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/addendum.html)</sup>

一个数被编码在若干字段中：符号位、带偏置的指数和有效数（尾数）。单精度中指数字段为8位，有效数字段为23位；双精度中分别为11位和52位，另有一个隐藏的前导位，从而给出完整的24位或53位精度。<sup>[9](https://www.youtube.com/watch?v=PtFa7LhV96E)</sup>

标准要求结果正确舍入：对于规定的运算，所交付的结果由格式和舍入模式决定，在每一个符合标准的实现上都完全相同。<sup>[10](https://docs.nvidia.com/cuda/archive/8.0/floating-point/index.html)</sup> 规定的运算包括加、减、乘、除、平方根、融合乘加、余数、转换运算、缩放、符号运算和比较。<sup>[10](https://docs.nvidia.com/cuda/archive/8.0/floating-point/index.html)</sup>

## 渐进下溢

渐进下溢是标准中最具争议的新事物之一。小到无法以规格化形式表示的数会以非规格化格式保留下来，以便用于后续计算，而不是像此前的实现那样被冲刷为零。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 阿贡国家实验室的威廉·J·科迪（William J. Cody）分析了相互竞争的提案，支持渐进下溢，理由是它扩大了能够以自然方式安全求解的问题集合；在他举的例子 (Y − X) + X 中，Y − X 发生下溢，渐进下溢精确返回 Y，而冲刷为零则返回 X。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 来自斯坦福大学的《计算机程序设计艺术》作者高德纳（Donald E. Knuth）撰文支持说，渐进下溢为系统增添了一种似乎无法以任何其他方式实现的完备性。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup>

## 历史

这项工作始于微处理器行业。1976年，英特尔的约翰·帕尔默（John Palmer）找到加州大学伯克利分校数学教授威廉·卡汉（William Kahan），请他帮助制定一项公司浮点标准，最初的目标是英特尔 432 处理器以及用于 8086 和 8088 微处理器的 8087 浮点协处理器。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 当 IEEE 754 分委员会出现时，卡汉请求英特尔管理层允许他将算术工作推向国际标准，同时不公开英特尔标准中的许多专有特性。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup>

**伯克利草案。** 卡汉曾参加1977年9月的第二次 IEEE 754 会议，他招募了访问教授哈罗德·斯通（Harold Stone）和研究生杰罗姆·库南（Jerome Coonen），帮助为1978年4月的分委员会会议撰写初步提案；这成为 KCS（卡汉-库南-斯通）提案，分委员会最终将其采纳为关注焦点。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 在八年的制定过程中，卡汉断断续续地担任委员会主席。<sup>[11](https://www.slopbowl.ca/posts/2026-09-09-grumbletonian)</sup> 拟议标准的第8.0版草案于1981年由《IEEE 计算机》杂志发表。<sup>[12](https://www.arithmazium.org/library/lib_ieee754.html)</sup> 1985年的最终批准距1977年分委员会成立已有八年，阻力来自对旧有做法的依恋，而非技术上的不可行。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup>

**早期采用。** 到1980年，在正式批准之前，微处理器公司就已经在实现该提案：英特尔于1980年交付了 8087 协处理器，摩托罗拉正在为其 68000 系列开发 68881，国家半导体开发了 16081，苹果则在其全线产品中以软件实现的方式支持该拟议标准。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 卡汉后来观察到，在正式获批的一年之前，IEEE 754-1985 就已经成为事实标准。<sup>[13](https://people.eecs.berkeley.edu/~wkahan/ieee754status/754story.html)</sup> 十年之内，不仅几乎所有微处理器厂商都遵从了该标准，大型机和小型机制造商也采纳了它。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 卡汉因其在数值分析和算术方面的工作获得了1989年 ACM 图灵奖。<sup>[14](https://www.geschichte-der-informatik.de/articles/william_kahan_and_ieee_754/)</sup>

一项配套标准 IEEE 854-1987《与基数无关的浮点运算》将同样的思想扩展到十进制以及二进制算术；它后来被并入754的一次修订之中。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup>

## 修订

该标准定期修订。IEEE 754-2008 增加了融合乘加运算，该运算已内置于英伟达 GPU 和其他处理器的硬件之中。<sup>[10](https://docs.nvidia.com/cuda/archive/8.0/floating-point/index.html)</sup> 2008版于2011年被国际标准化组织采纳为 ISO/IEC/IEEE 60559。<sup>[15](https://dlmf.nist.gov/3.1)</sup>

IEEE 754-2019 于2019年6月13日批准，2019年7月发布，是对754-2008的小幅修订，自我约束为与上一版兼容，仅作小幅扩展；大卫·霍夫（David Hough）担任修订委员会主席，迈克·考利肖（Mike Cowlishaw）担任编辑。<sup>[2](https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/)</sup><sup> • </sup><sup>[16](https://people.eecs.berkeley.edu/~demmel/ma221_Fall24/IEEE_Computer_Hough_2019.pdf)</sup> 其最引人注目的新特性是增广算术运算，它以两部分交付加法、减法或乘法的精确结果，两部分相加即为精确结果，并使用一种新的舍入方法——就近舍入、平局向零。<sup>[16](https://people.eecs.berkeley.edu/~demmel/ma221_Fall24/IEEE_Computer_Hough_2019.pdf)</sup> 这些运算的目标是实现与求和顺序无关的位级可复现向量求和（例如在线程数变化时），以及“双-双精度”软件，后者扩展了硬件所能提供的最高精度，用于高精度计算，如气候预测和太阳系稳定性模拟。<sup>[16](https://people.eecs.berkeley.edu/~demmel/ma221_Fall24/IEEE_Computer_Hough_2019.pdf)</sup> 2019版建议对二进制格式使用增广运算；对十进制格式的要求尚未确定。<sup>[17](https://dms-discourse-static.s3.dualstack.us-east-1.amazonaws.com/original/3X/b/7/b7b9c1edaf4019395d2b8315620948e240bf3f8f.pdf)</sup>

在国际层面，ISO/IEC 60559:2020 第1版于2020年5月发布，共74页，取代已撤销的 ISO/IEC/IEEE 60559:2011；其摘要文字与 IEEE 754-2019 一致。<sup>[5](https://www.iso.org/standard/80985.html)</sup>

## 采用情况与实际限制

截至2022年，所有具备浮点运算的通用处理器实质上均遵循 IEEE 754，数字信号处理器等专用芯片对其所支持的运算也使用 IEEE 754 格式和算术；最新的机器学习和 GPU 芯片从该标准中汲取灵感，16位半浮点和 bfloat16 类型即是明证。<sup>[3](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)</sup> 至少自2000年以来，几乎所有机器都使用 IEEE 754 二进制浮点运算，例如 Python 将其浮点数映射为具有53位精度的 IEEE 754 binary64 双精度值。<sup>[18](https://docs.python.org/3/tutorial/floatingpoint.html)</sup>

符合性并不总是完整的。英伟达记录称，其所有 GPU 设备在二进制浮点运算方面遵循 IEEE 754-2019，但有限制：没有可动态配置的舍入模式；没有检测浮点异常的机制，因此所有运算的行为都如同异常始终被屏蔽；浮点运算可能改变输入 NaN 载荷的位模式。<sup>[19](https://docs.nvidia.com/cuda/cuda-programming-guide/05-appendices/mathematical-functions.html)</sup>

**可复现性。** 即便严格符合标准，也不能使浮点结果与顺序无关，因为浮点加法不满足结合律：每次运算后的舍入意味着 (A + B) + C 与 A + (B + C) 可能不同，同一计算以不同方式组织，在任何符合标准的硬件上都可能产生不同结果。<sup>[10](https://docs.nvidia.com/cuda/archive/8.0/floating-point/index.html)</sup> 在并行高性能计算中，跨线程和处理器的非确定性求和顺序即使在单一平台上也会产生逐次运行的差异，这是大型模拟中数值可复现性方面已有文献记载的障碍。<sup>[20](https://citeseerx.ist.psu.edu/document?doi=fac2931f82082293a2d6d85676665b89c7fb2a24&repid=rep1&type=pdf)</sup> 2019修订版增广运算的设计目的之一，正是使可复现求和成为可能。<sup>[16](https://people.eecs.berkeley.edu/~demmel/ma221_Fall24/IEEE_Computer_Hough_2019.pdf)</sup>

卡汉还指出了硬件与软件之间长期存在的差距：编程语言，无论新的（Java）还是旧的（Fortran），长期缺乏对硬件所提供的 IEEE 754 特性的有力支持，而程序员往往没有意识到 IEEE 754 是其编程环境的标准，而不仅仅是硬件的标准。<sup>[13](https://people.eecs.berkeley.edu/~wkahan/ieee754status/754story.html)</sup>

## References

1. [IEEE 754-2019, IEEE Standard for Floating-Point Arithmetic, IEEE SA](https://standards.ieee.org/ieee/754/6210/)
2. [ANSI/IEEE Std 754-2019 scope page, IEEE Microprocessor Standards Committee](https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/)
3. [Milestones: IEEE Standard 754 for Binary Floating-Point Arithmetic, 1985, Engineering and Technology History Wiki](https://ethw.org/Milestones%3AIEEE_Standard_754_for_Binary_Floating-Point_Arithmetic%2C_1985)
4. [IEEE Arithmetic, Oracle Numerical Computation Guide](https://docs.oracle.com/cd/E19422-01/819-3693/ncg_math.html)
5. [ISO/IEC 60559:2020, Information technology — Microprocessor Systems — Floating-Point arithmetic, ISO](https://www.iso.org/standard/80985.html)
6. [Accuracy and Stability of Numerical Algorithms, chapter 2 (IEEE Arithmetic), SIAM](https://ieeemilestones.ethw.org/w/images/8/84/Accuracy_and_Stability_Chapter_2.pdf)
7. [IEEE 754-1985 standard text (table of contents and scope), IEEE Milestones Wiki](https://ieeemilestones.ethw.org/w/images/d/d9/Ieee754-1985.pdf)
8. [Differences Among IEEE 754 Implementations, IEEE 754-2019 background addendum](https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/addendum.html)
9. [IEEE 754 Standard - Floating Point Binary Numbers, Mohamed Chiny (YouTube)](https://www.youtube.com/watch?v=PtFa7LhV96E)
10. [Floating Point and IEEE 754 Compliance for NVIDIA GPUs, CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/archive/8.0/floating-point/index.html)
11. [The chair of the committee: William Morton Kahan, slopbowl](https://www.slopbowl.ca/posts/2026-09-09-grumbletonian)
12. [IEEE 754 library shelf, Arithmazium](https://www.arithmazium.org/library/lib_ieee754.html)
13. [Reminiscences elicited from William Kahan by Charles Severance, UC Berkeley](https://people.eecs.berkeley.edu/~wkahan/ieee754status/754story.html)
14. [William Kahan and IEEE 754, Geschichte der Informatik](https://www.geschichte-der-informatik.de/articles/william_kahan_and_ieee_754/)
15. [DLMF §3.1 Arithmetics and Error Measures, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/3.1)
16. [The IEEE Standard 754: One for the History Books, IEEE Computer (2019)](https://people.eecs.berkeley.edu/~demmel/ma221_Fall24/IEEE_Computer_Hough_2019.pdf)
17. [IEEE Std 754-2019 text, clause 9.5 Augmented arithmetic operations](https://dms-discourse-static.s3.dualstack.us-east-1.amazonaws.com/original/3X/b/7/b7b9c1edaf4019395d2b8315620948e240bf3f8f.pdf)
18. [Floating-Point Arithmetic: Issues and Limitations, Python 3 documentation](https://docs.python.org/3/tutorial/floatingpoint.html)
19. [Floating-Point Computation, CUDA Programming Guide](https://docs.nvidia.com/cuda/cuda-programming-guide/05-appendices/mathematical-functions.html)
20. [First steps towards more numerical reproducibility, Jézéquel, Langlois, and Revol, ESAIM: Proceedings (2013)](https://citeseerx.ist.psu.edu/document?doi=fac2931f82082293a2d6d85676665b89c7fb2a24&repid=rep1&type=pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Computational arithmetic › Floating-point and mixed-precision arithmetic

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/ieee-754

English original: https://www.edgepedia.org/ieee-754
