博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
单精度 半精度 双精度_单精度与双精度
阅读量:2509 次
发布时间:2019-05-11

本文共 3883 字,大约阅读时间需要 12 分钟。

单精度 半精度 双精度

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之类的数字。 与单精度相比,双精度需要更多的存储空间,因此在执行常规计算时没有用。 这种表示技术可用于科学计算中。

Single Precision vs Double Precision

单精度与双精度 (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.

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

翻译自:

单精度 半精度 双精度

转载地址:http://gaggb.baihongyu.com/

你可能感兴趣的文章
解决 kindle 书籍字体颜色偏淡问题的方法
查看>>
大话C#之属性
查看>>
Comparision Linq toSQL with ADO.net Entity Framework
查看>>
ms转成00:00:00的时间格式化
查看>>
另一个SqlParameterCollection中已包含SqlParameter(转)
查看>>
SWPU静态邮件登录界面
查看>>
iOS开发中NSRunloop跟NSTimer的问题
查看>>
c++--类的静态成员
查看>>
luogu准备复习(学习)题单
查看>>
MyQL的行转列,列转行
查看>>
网球训练
查看>>
10种linux下磁盘快照方式恢复系统
查看>>
Python selenium chrome打包exe后禁用控制台输出滚动日志
查看>>
求子数组的最大和
查看>>
ssm实现支付宝支付功能(图文详解)
查看>>
OpenJudge NOI题库 6266:取石子游戏
查看>>
CQOI2016 Number - 数位dp
查看>>
致以后可能会用到的angular(虽然没什么机会)
查看>>
JQuery --- 第六期 (Ajax)
查看>>
Python和Java编程题(六)
查看>>