单精度 半精度 双精度

Here you will learn about Single Precision vs Double Precision.

在这里,您将了解单精度与双精度。

When talking about the numbers, amount of precision that can be reached using a representation technique has always been the major area of interest for the researchers. This curiosity to increase the precision and challenge the representation limits of numerical values, in computer science, lead to two major achievements – single precision and double precision.

在讨论数字时,使用表示技术可以达到的精度一直是研究人员关注的主要领域。 在计算机科学中,这种提高精度和挑战数值表示极限的好奇心带来了两项主要成就–单精度和双精度。

单精度 (Single Precision)

Single precision is the 32 bit representation of numerical values in computers. It is also known as binary32. Some languages, like JAVA, C++ use float to store these kinds of numerals. Some languages (Visual Basic) refer single numerals as single.

单精度是计算机中数值的32位表示形式。 它也被称为binary32。 某些语言,例如JAVA,C ++,使用float来存储这些数字。 某些语言(Visual Basic)将单个数字称为单个。

Single precision is most widely used because of its capability to represent wide range of numeral values, though it reduces the amount of precision achieved.

单精度由于其能够表示宽范围的数字值而被广泛使用,尽管它降低了获得的精度。

Single precision uses 32 bit to represent a floating point number.

单精度使用32位表示浮点数。

First bit represent the sign of the number, negative or positive.

第一位代表数字的符号,负数或正数。

Next 8 bits are used to store the exponent of the number. This exponent can be signed 8-bit integer ranging from -127 – 128 of signed integer (0 to 255).

接下来的8位用于存储数字的指数。 该指数可以是8位带符号整数,范围是-127 – 128个带符号整数(0到255)。

And the left 23 bits are used to represent the fraction part and are called fraction bits.

剩下的23位用于表示小数部分,称为小数位。

8 exponent bits provide us with the range and 23 bits provide us with the actual precision.

8个指数位为我们提供了范围,而23位则为我们提供了实际精度。

双精度 (Double Precision)

Double precision is called binary64. Double precision uses 64 bits to represent a value.

双精度称为binary64。 双精度使用64位表示值。

First bit is used for the same purpose as in single point precision i.e., represents sign of the number.

第一位用于与单点精度相同的目的,即代表数字的符号。

Next 11 bits are used to denote exponent, which provide us with the range, and has 3 more bits than single precision, so it is used to represent a wider range of values.

接下来的11位用于表示指数,它为我们提供了范围,并且比单精度多3位,因此用于表示更大范围的值。

Next 52 bits are used to represent the fractional part which is 29 bits more than binary32 bit representation scheme. So it has a greater precision than single precision.

接下来的52位用于表示小数部分,该部分比bina​​ry32位表示方案多29位。 因此它具有比单精度更高的精度。

Double floating point precision are used where high arithmetic precision is required and number like – 2/19 have to be used. Double point precision requires more memory as compared to single precision, hence are not useful when normal calculations are to be performed. This representation technique finds its use in the scientific calculations.

如果需要较高的算术精度,则使用双浮点精度,并且必须使用– 2/19之类的数字。 与单精度相比,双精度需要更多的存储空间,因此在执行常规计算时没有用。 这种表示技术可用于科学计算中。

Image Source

图片来源

单精度与双精度 (Single Precision vs Double Precision)

Single Precision Double Precision
Is binary32 bit representation scheme. Is binary64 bit representation scheme.
Uses 32 bit memory to represent a value. Uses 64 bit memory to represent a value.
Uses 1 bit to represent sign. Uses 1 bit to represent sign.
Uses 8 bits to represent exponent. Uses 11 bits to represent exponent.
Uses 23 bits to represent fractional part. Uses 52 bits to represent fractional part.
Is widely used in games and programs requiring less precision and wide representation. Finds its use in the area to scientific calculations, where precision is all that matters and approximation is to be minimized.
单精度 双精度
是binary32位表示方案。 是binary64位表示方案。
使用32位内存表示一个值。 使用64位内存表示一个值。
使用1位代表符号。 使用1位代表符号。
使用8位代表指数。 使用11位代表指数。
使用23位代表小数部分。 使用52位代表小数部分。
广泛用于要求较低精度和广泛表示的游戏和程序中。 可以在科学计算领域中找到其用处,在此领域中,精度至关重要,应尽量减少近似值。

Comment below if you queries related to difference between Single Precision and Double Precision.

如果您查询有关单精度和双精度之间差异的问题,请在下面评论。

翻译自: https://www.thecrazyprogrammer.com/2018/04/single-precision-vs-double-precision.html

单精度 半精度 双精度

单精度 半精度 双精度_单精度与双精度相关推荐

  1. python单精度和双精度_单精度、双精度、多精度和混合精度计算的区别是什么?...

    点击上方"大鱼机器人",选择"置顶/星标公众号" 福利干货,第一时间送达! 编排 | strongerHuang 微信公众号 | 嵌入式专栏 我们学过数学,都知 ...

  2. mysql单精度与双精度_单精度与双精度的区别

    展开全部 单精32313133353236313431303231363533e58685e5aeb931333365656466度与双精度的区别: 1.单精度数是指计算机表达实数近似值的一种方式.单 ...

  3. 浮点数双精度,单精度以及半精度知识总结

    最近工作中遇到一个16位半精度浮点数的问题,纠结了很久,特此研究了一下,总结在此: 1.单精度(32位)浮点数的结构: 名称  长度 比特 位置 符号位 Sign(S):  1bit     (b31 ...

  4. 浮点运算/半精度,单精度,双精度/浮点和定点

    目录 1.实数数的表示 1.1定点数 1.2浮点数 2.精度说明 2.1半精度FP16 3.浮点运算加法和乘法 3.1加法 3.2乘法 1.实数数的表示 参考深入理解C语言-03-有符号数,定点数,浮 ...

  5. python单精度和双精度的区别_单精度、双精度和半精度浮点格式之间的区别

    我们学过数学,都知道有理数和无理数,然后在有理数中有一类叫浮点数的数字,不知道大家对这些还有没有印象? 在软件编程的时候,我们也会用到浮点数,一种既包含小数又包含整数的数据类型. 下面就来讲讲关于浮点 ...

  6. 单精度、双精度和半精度浮点格式之间的区别

    源自公众号strongerHuang 单精度.双精度和半精度浮点格式之间的区别 IEEE 浮点算术标准是用来衡量计算机上以二进制所表示数字精度的通用约定.在双精度格式中,每个数字占用64位,单精度格式 ...

  7. 在计算机领域,半精度、单精度、双精度的定义,以及多精度计算和混合精度计算的区别。

    在计算机系统的内存中,半精度是16bit,单精度是32bit,双精度是64bit. signed bit符号位,有效数字的符号位 Exponent 阶码或者叫指数,以10^Exponent表示 Sig ...

  8. 双精度浮点数转换_模型压缩一半,精度几乎无损,TensorFlow推出半精度浮点量化工具包,还有在线Demo...

    鱼羊 发自 凹非寺  量子位 报道 | 公众号 QbitAI 近日,TensorFlow模型优化工具包又添一员大将,训练后的半精度浮点量化(float16 quantization)工具. 有了它,就 ...

  9. 单精度和半精度混合训练

    单精度和半精度混合训练 概述 混合精度训练方法,通过混合使用单精度和半精度数据格式,加速深度神经网络训练的过程,同时保持了单精度训练所能达到的网络精度.混合精度训练能够加速计算过程,同时减少内存使用和 ...

最新文章

  1. nginx-http服务器
  2. 全球及中国水产养殖和畜牧保险行业风险研究与“十四五”投资建议报告2021年版
  3. fastweixin v1.3.0 发布,极速微信公众号开发框架
  4. Text store debug FM CRM_TEXT_MAINTAIN_OW
  5. C语言、嵌入式位操作精华技巧大汇总
  6. Linux恢复win分区,找到了linux分区顺序错乱修复方法
  7. 目标检测系列(七)——CornerNet:detecting objects as paired keypoints
  8. oracle常用用户权限,oracle创建新用户及授予常用权限
  9. computed用发_Vue中的computed属性和nextTick方法
  10. html5经纬度 ios,iOS 如何根据经纬度来定位位置(示例代码)
  11. 云桌面优缺点_云桌面真的是办公最佳选择吗?云桌面的优缺点对比
  12. 区块链+区域性股权市场:背景、思路与模式探索
  13. 操作系统——进程管理(进程的概念与进程控制)
  14. “黑暗潜伏者” -- 手机病毒新型攻击方式
  15. 隐藏终端和暴露终端浅析
  16. foo, bar ,baz
  17. rn 滑动验证_rn-fetch-blob
  18. 中国人保为嘉德奥通承保产品责任险,为消费者保驾护航!
  19. C++杂记(一)——常见知识总结
  20. 小程序实现播放器功能 小程序播放器怎么实现

热门文章

  1. 人脸识别应用于刷脸考勤的设计与效果
  2. 其他sql注入写入webshell的方式
  3. 汽车智能化进入赛点:城市NOA落地竞速,战至最后一公里
  4. OpenCV2 计算机视觉应用编程秘籍:1~5
  5. Excel表中进行算术运算的时候固定单元格操作
  6. luogu2807三角形计数
  7. 为了让大家更好地学习python爬虫,我们做了一个“靶子”
  8. map.keySet()踩坑
  9. 局域网共享软件——wifi网盘
  10. 如何配置 VirtualBox 虚拟机的网络模式