单精度 半精度 双精度

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. 201671010145 2016-2017《Java程序设计》JAVA语言中,异常处理有哪几种方式?
  2. 通过一个端口读取多个按钮
  3. C#语言编程之抽象类与接口的比较
  4. spark.kubernetes.file.upload.path的作用
  5. POJ 3233 Matrix Power Series (矩阵分块,递推)
  6. Java EE 8 –为更多设备提供更多应用程序
  7. Python学习札记(十七) 高级特性3 列表生成式
  8. Python is 和 == 区别 - Python零基础入门教程
  9. 常用技巧 —— 位运算 —— 位运算的应用
  10. java哪个软件编程好学吗_自学编程:Java和C语言相比哪个好?哪个更值得学习?...
  11. Java 网络教程: ServerSocket
  12. poj 1032 Parliament 编程的小技巧
  13. vuex实例方法replaceState解决vuex页面刷新数据丢失问题
  14. 基于spark的微博数据分析
  15. #Linux中的GCC编程# 20170731 C培训作业
  16. python保存简单网页图片到本地(详细步骤)
  17. 元宇宙产业委员会联席秘书长李正海做元宇宙顶层设计预研项目探讨报告
  18. 重装系统后,没有以太网和WLAN怎么办
  19. Debian 启用root账户远程登录并删除多余用户
  20. android 个推封装,Android个推快速集成

热门文章

  1. 特征工程:PCA主成分分析(实例)
  2. 区块链基础:散列法 (Hashing)
  3. .bat批处理启动redis
  4. CF - 784A. Numbers Joke - 瞎猜
  5. Tensorflow2 图像分类-Flowers数据深度学习模型保存、读取、参数查看和图像预测
  6. 对抗攻击笔记03:l0,l2,l∞范数
  7. 项目一~美食达人图册
  8. el-table实现单选
  9. Android 侧滑菜单(抽屉)的使用总结
  10. SAP中如何合并会计凭证(Summarizing FI documents)