梦到手机丢了什么预兆| 红色属于五行属什么| 骨质增生吃什么药最好| 判处死刑缓期二年执行是什么意思| 游离甲状腺素偏低是什么意思| 梦见大便是什么意思| 皮肤越抓越痒是什么原因| 梦见被蛇追着咬是什么意思| 晨尿泡沫多是什么原因| 鸽子和什么一起炖汤最有营养| 荒唐是什么意思| 蜱虫最怕什么药| 屈光和近视有什么区别| qw医学上是什么意思| 兔子是什么意思| 作怪是什么意思| 喝普洱茶有什么好处| 今夕何夕什么意思| 什么是半衰期| 一直鼻塞是什么原因| c2驾驶证能开什么车| 戴芬是什么药| 月经流的是什么血| 玩世不恭是什么意思| 五官端正是什么意思| 立夏吃什么蛋| 河南有什么景点| 女人切除子宫有什么影响| 11月15日出生是什么星座| 附件炎是什么引起的| 云母是什么东西| 相知是什么意思| 梦见死了人是什么征兆| 扁桃体发炎吃什么药效果最好| 血友病是什么意思| 家蛇是什么蛇| 学架子鼓有什么好处| 高血压挂什么科| 胸部ct挂什么科| 着重号是什么符号| 内膜薄是什么意思| 生蚝补什么| 舌头上有溃疡是什么原因| 运动员心率为什么慢| 什么叫白眼狼| 二月十号是什么星座| 狐狸狗是什么品种| 什么时间英语| 毛囊炎是什么样子| 了是什么词性| 孕育是什么意思| style是什么意思| 口嫌体正直是什么意思| 名垂千古是什么意思| 布衣蔬食是什么意思| 藏族信仰什么教| 红细胞是什么| 40而不惑是什么意思| 形声字是什么意思| 调剂生是什么意思| eee是什么牌子的鞋| 口苦吃什么药最有效| 什么是月子病| 经产妇是什么意思| 什么三迁| 前胸后背长痘痘用什么药| 指甲上有白点是什么原因| 猪尾巴炖什么好吃| 嘌呤高会引起什么症状| 英特纳雄耐尔是什么意思| 例行是什么意思| 妇科菌群失调吃什么药| 公鸡为什么会啄人| 梦见拉屎是什么意思| 世界上最难写的字是什么字| 公章是什么样的| 老人高烧不退是什么原因| 幽门螺杆菌什么药最好| 石楠花是什么味道| 草字头见念什么| 拉稀水是什么原因| 安眠药有什么副作用| 吃什么可以补黑色素| 胃疼吃什么止痛药| 女的学什么手艺最赚钱| 天宫是什么意思| 桥本甲状腺炎吃什么药| 头皮屑多的原因是什么| 什么的天安门| 攸字五行属什么| 尿味重是什么原因| 男性尿道疼痛小便刺痛吃什么药| 众星捧月是什么意思| 放任是什么意思| 开胸手术吃什么补元气| 医院脱毛挂什么科| 塞翁失马是什么意思| 鸡蛋属于什么类| 暗是什么生肖| study是什么意思| 西罗手表什么档次| 每天吃洋葱有什么好处| 脾胃不好吃什么调理| 湄公鱼是什么鱼| 寒湿化热吃什么中成药| 什么辉煌四字词语| 阴阳和合是什么意思| pku是什么意思| 今夕何夕什么意思| 菊花和枸杞泡水喝有什么功效| 吃什么食物能提高免疫力| 白细胞酯酶弱阳性是什么意思| 吸烟有害健康为什么国家还生产烟| 如梦初醒是什么意思| 射手座属于什么象星座| 风雨交加是什么生肖| 官鬼是什么意思| 梦见嫖娼是什么意思| 八爪鱼是什么| 理工男是什么意思啊| 孕晚期吃什么水果好| 男生下巴长痘痘是什么原因| 蚕蛹吃什么| 肌酐高有什么症状表现| 左眉毛跳是什么预兆| 月经期间适合吃什么水果| 冻雨是什么| 4月15号是什么星座| 苹果是什么季节的水果| 儿童用什么牙膏最好可以保护牙齿| 苯甲酸钠是什么东西| 眼睑痉挛是什么原因造成的| 巴图是什么意思| 脚气用什么泡脚| 便秘吃什么最快排便| 执业医师是什么意思| 老夫是什么意思| 什么丰富| 心脏造影是什么| 学子是什么意思| 脾气暴躁易怒是什么病| 三亚在海南的什么位置| 吃什么盐最好| 婚前体检都检查什么| 什么果不能吃| 化疗后吃什么补身体| 全友床垫属于什么档次| 视网膜脱落是什么原因引起的| 当我们谈论爱情时我们在谈论什么| er是什么元素| 夏天煲鸡汤放什么材料| 两情相悦什么意思| 省内流量是什么意思| 香干炒什么菜好吃| 农历五月十九是什么日子| 66年属什么| 明朝为什么会灭亡| 敲定是什么意思| 为什么晚上不能倒垃圾| 月经期间吃什么最好| 吃茴香有什么好处和坏处| 碳水化合物是什么食物| 三月初八是什么星座| 县公安局局长是什么级别| 原生家庭是什么意思| 肛门塞什么东西最舒服| 射手座有什么特点| 盆腔炎有什么症状| 宝姿是什么档次的牌子| 巧克力囊肿是什么| 女生下面出血但不是月经为什么| 吃什么水果好| 什么是什么造句| 安哥拉树皮有什么功效| 卡地亚手表什么档次| 心脏突然剧烈跳动是什么原因| 肛瘘是什么原因引起的| 木耳不能和什么一起吃| 宫颈那囊什么意思| 镜面人是什么意思| 一个火一个羽一个白念什么| 身份证什么时候可以办| 灰指甲是什么原因| 为什么容易被蚊子咬| 什么像什么| 淋巴细胞数偏高是什么意思| 补钙吃什么食物| 经常打飞机有什么危害| com是什么| 夫妻宫是什么意思| 女性私处为什么会变黑| 甲醛什么味| 十里八乡什么意思| 宅是什么意思| 绿洲是什么意思| 海绵体供血不足吃什么药| 子宫肌瘤是什么意思| 嗤之以鼻是什么意思| 乳腺化疗期间吃什么| 肾尿盐结晶是什么意思| 乙丑是什么生肖| 命好的人都有什么特征| 早上吃什么早餐最好| 本色出演是什么意思| 什么是血氧| 睡不着觉挂什么科| 旗舰店是什么意思| 血精是什么原因| 靳东妹妹叫什么名字| 蓝莓树长什么样| 吃什么食物可以去湿气| 清道夫鱼为什么不能吃| 咂是什么意思| 胃体息肉是什么意思| 蝎子长什么样| 白鳍豚用什么呼吸| 睾丸肿大是什么原因| 血药浓度是什么意思| 什么去火效果最好| 有什么汤菜谱大全| 环切是什么意思| 什么叫三观| 秦始皇什么星座| 冰冻三尺的下一句是什么| 吃什么止咳| 嗓子疼挂什么科| 调节肠道菌群吃什么药| 无聊的反义词是什么| 拆穿是什么意思| 窦性心动过缓什么意思| cap医学上是什么意思| 深呼吸有什么好处| 什么异思迁| 胸上长痘痘是什么原因| 晚上睡觉出虚汗是什么原因| 治疗肺部气肿有什么方法| 肛门周围痒是什么原因| 小孩子手脱皮是什么原因引起的| 为什么肚子会胀气| 痛风挂什么科就医| 茅庐是什么意思| 左肾肾盂分离什么意思| 鱼漂什么牌子的好| 水瓶座和什么座最配对| 用凝胶排出豆腐渣一样的东西是什么原因| 炒米是什么米做的| 排卵期什么时候开始| 农历五月初五是什么星座| kp是什么意思| 复方氨酚苯海拉明片是什么药| 炖汤用什么锅比较好| 胎儿左侧侧脑室增宽的原因是什么| 眼角下面长斑是什么原因引起的| 胎儿缺氧孕妇会有什么反应| 非特异性阴道炎是什么意思| 后背疼是什么原因引起的| 善什么甘什么| cheese是什么意思| 直捣黄龙是什么意思| 五行火生什么克什么| o血型的人有什么特点| dex是什么药| 今年农历是什么年号| 维生素c有什么作用| 百度

小米5c怎么开启双击唤醒 小米5c开启双击唤醒教程

百度 社会主义选举民主是我国人民民主的根本形式,而“社会主义协商民主是我国人民民主的重要形式”,两者相互补充、相辅相成、相得益彰。

Double-precision floating-point format (sometimes called FP64 or float64) is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point.

Double precision may be chosen when the range or precision of single precision would be insufficient.

In the IEEE 754 standard, the 64-bit base-2 format is officially referred to as binary64; it was called double in IEEE 754-1985. IEEE 754 specifies additional floating-point formats, including 32-bit base-2 single precision and, more recently, base-10 representations (decimal floating point).

One of the first programming languages to provide floating-point data types was Fortran.[citation needed] Before the widespread adoption of IEEE 754-1985, the representation and properties of floating-point data types depended on the computer manufacturer and computer model, and upon decisions made by programming-language implementers. E.g., GW-BASIC's double-precision data type was the 64-bit MBF floating-point format.

IEEE 754 double-precision binary floating-point format: binary64

Double-precision binary floating-point is a commonly used format on PCs, due to its wider range over single-precision floating point, in spite of its performance and bandwidth cost. It is commonly known simply as double. The IEEE 754 standard specifies a binary64 as having:

The sign bit determines the sign of the number (including when this number is zero, which is signed).

The exponent field is an 11-bit unsigned integer from 0 to 2047, in biased form: an exponent value of 1023 represents the actual zero. Exponents range from ?1022 to +1023 because exponents of ?1023 (all 0s) and +1024 (all 1s) are reserved for special numbers.

The 53-bit significand precision gives from 15 to 17 significant decimal digits precision (2?53 ≈ 1.11 × 10?16). If a decimal string with at most 15 significant digits is converted to the IEEE 754 double-precision format, giving a normal number, and then converted back to a decimal string with the same number of digits, the final result should match the original string. If an IEEE 754 double-precision number is converted to a decimal string with at least 17 significant digits, and then converted back to double-precision representation, the final result must match the original number.[1]

The format is written with the significand having an implicit integer bit of value 1 (except for special data, see the exponent encoding below). With the 52 bits of the fraction (F) significand appearing in the memory format, the total precision is therefore 53 bits (approximately 16 decimal digits, 53 log10(2) ≈ 15.955). The bits are laid out as follows:

 

The real value assumed by a given 64-bit double-precision datum with a given biased exponent   and a 52-bit fraction is

 

or

 

Between 252=4,503,599,627,370,496 and 253=9,007,199,254,740,992 the representable numbers are exactly the integers. For the next range, from 253 to 254, everything is multiplied by 2, so the representable numbers are the even ones, etc. Conversely, for the previous range from 251 to 252, the spacing is 0.5, etc.

The spacing as a fraction of the numbers in the range from 2n to 2n+1 is 2n?52. The maximum relative rounding error when rounding a number to the nearest representable one (the machine epsilon) is therefore 2?53.

The 11 bit width of the exponent allows the representation of numbers between 10?308 and 10308, with full 15–17 decimal digits precision. By compromising precision, the subnormal representation allows even smaller values up to about 5 × 10?324.

Exponent encoding

The double-precision binary floating-point exponent is encoded using an offset-binary representation, with the zero offset being 1023; also known as exponent bias in the IEEE 754 standard. Examples of such representations would be:

e =000000000012=00116=1:   (smallest exponent for normal numbers)
e =011111111112=3ff16=1023:   (zero offset)
e =100000001012=40516=1029:  
e =111111111102=7fe16=2046:   (highest exponent)

The exponents 00016 and 7ff16 have a special meaning:

  • 000000000002=00016 is used to represent a signed zero (if F = 0) and subnormal numbers (if F ≠ 0); and
  • 111111111112=7ff16 is used to represent (if F = 0) and NaNs (if F ≠ 0),

where F is the fractional part of the significand. All bit patterns are valid encoding.

Except for the above exceptions, the entire double-precision number is described by:

 

In the case of subnormal numbers (e = 0) the double-precision number is described by:

 

Endianness

Although many processors use little-endian storage for all types of data (integer, floating point), there are a number of hardware architectures where floating-point numbers are represented in big-endian form while integers are represented in little-endian form.[2] There are ARM processors that have mixed-endian floating-point representation for double-precision numbers: each of the two 32-bit words is stored as little-endian, but the most significant word is stored first. VAX floating point stores little-endian 16-bit words in big-endian order. Because there have been many floating-point formats with no network standard representation for them, the XDR standard uses big-endian IEEE 754 as its representation. It may therefore appear strange that the widespread IEEE 754 floating-point standard does not specify endianness.[3] Theoretically, this means that even standard IEEE floating-point data written by one machine might not be readable by another. However, on modern standard computers (i.e., implementing IEEE 754), one may safely assume that the endianness is the same for floating-point numbers as for integers, making the conversion straightforward regardless of data type. Small embedded systems using special floating-point formats may be another matter, however.

Double-precision examples

  0 01111111111 00000000000000000000000000000000000000000000000000002
? 3FF0 0000 0000 000016
? +20 × 1
= 1
  0 01111111111 00000000000000000000000000000000000000000000000000012
? 3FF0 0000 0000 000116
? +20 × (1 + 2?52)
≈ 1.0000000000000002220 (the smallest number greater than 1)
  0 01111111111 00000000000000000000000000000000000000000000000000102
? 3FF0 0000 0000 000216
? +20 × (1 + 2?51)
≈ 1.0000000000000004441 (the second smallest number greater than 1)
  0 10000000000 00000000000000000000000000000000000000000000000000002
? 4000 0000 0000 000016
? +21 × 1
= 2
  1 10000000000 00000000000000000000000000000000000000000000000000002
? C000 0000 0000 000016
? ?21 × 1
= ?2
  0 10000000000 10000000000000000000000000000000000000000000000000002
? 4008 0000 0000 000016
? +21 × 1.12
= 112
= 3
  0 10000000001 00000000000000000000000000000000000000000000000000002
? 4010 0000 0000 000016
? +22 × 1
= 1002
= 4
  0 10000000001 01000000000000000000000000000000000000000000000000002
? 4014 0000 0000 000016
? +22 × 1.012
= 1012
= 5
  0 10000000001 10000000000000000000000000000000000000000000000000002
? 4018 0000 0000 000016
? +22 × 1.12
= 1102
= 6
  0 10000000011 01110000000000000000000000000000000000000000000000002
? 4037 0000 0000 000016
? +24 × 1.01112
= 101112
= 23
  0 01111111000 10000000000000000000000000000000000000000000000000002
? 3F88 0000 0000 000016
? +2?7 × 1.12
= 0.000000112
= 0.01171875 (3/256)
  0 00000000000 00000000000000000000000000000000000000000000000000012
? 0000 0000 0000 000116
? +2?1022 × 2?52
= 2?1074
≈ 4.9406564584124654 × 10?324 (smallest positive subnormal number)
  0 00000000000 11111111111111111111111111111111111111111111111111112
? 000F FFFF FFFF FFFF16
? +2?1022 × (1 ? 2?52)
≈ 2.2250738585072009 × 10?308 (largest subnormal number)
  0 00000000001 00000000000000000000000000000000000000000000000000002
? 0010 0000 0000 000016
? +2?1022 × 1
≈ 2.2250738585072014 × 10?308 (smallest positive normal number)
  0 11111111110 11111111111111111111111111111111111111111111111111112
? 7FEF FFFF FFFF FFFF16
? +21023 × (2 ? 2?52)
≈ 1.7976931348623157 × 10308 (largest normal number)
  0 00000000000 00000000000000000000000000000000000000000000000000002
? 0000 0000 0000 000016
? +0 (positive zero)
  1 00000000000 00000000000000000000000000000000000000000000000000002
? 8000 0000 0000 000016
? ?0 (negative zero)
  0 11111111111 00000000000000000000000000000000000000000000000000002
? 7FF0 0000 0000 000016
? +∞ (positive infinity)
  1 11111111111 00000000000000000000000000000000000000000000000000002
? FFF0 0000 0000 000016
? ?∞ (negative infinity)
  0 11111111111 00000000000000000000000000000000000000000000000000012
? 7FF0 0000 0000 000116
? NaN (sNaN on most processors, such as x86 and ARM)
  0 11111111111 10000000000000000000000000000000000000000000000000012
? 7FF8 0000 0000 000116
? NaN (qNaN on most processors, such as x86 and ARM)
  0 11111111111 11111111111111111111111111111111111111111111111111112
? 7FFF FFFF FFFF FFFF16
? NaN (an alternative encoding of NaN)
  0 01111111101 01010101010101010101010101010101010101010101010101012
? 3FD5 5555 5555 555516
? +2?2 × (1 + 2?2 + 2?4 + ... + 2?52)
≈ 0.33333333333333331483 (closest approximation to 1/3)
  0 10000000000 10010010000111111011010101000100010000101101000110002
? 4009 21FB 5444 2D1816
≈ 3.141592653589793116 (closest approximation to π)

Encodings of qNaN and sNaN are not completely specified in IEEE 754 and depend on the processor. Most processors, such as the x86 family and the ARM family processors, use the most significant bit of the significand field to indicate a quiet NaN; this is what is recommended by IEEE 754. The PA-RISC processors use the bit to indicate a signaling NaN.

By default, 1/3 rounds down, instead of up like single precision, because of the odd number of bits in the significand.

In more detail:

Given the hexadecimal representation 3FD5 5555 5555 555516,
  Sign = 0
  Exponent = 3FD16 = 1021
  Exponent Bias = 1023 (constant value; see above)
  Fraction = 5 5555 5555 555516
  Value = 2(Exponent ? Exponent Bias) × 1.Fraction – Note that Fraction must not be converted to decimal here
        = 2?2 × (15 5555 5555 555516 × 2?52)
        = 2?54 × 15 5555 5555 555516
        = 0.333333333333333314829616256247390992939472198486328125
        ≈ 1/3

Execution speed with double-precision arithmetic

Using double-precision floating-point variables is usually slower than working with their single precision counterparts. One area of computing where this is a particular issue is parallel code running on GPUs. For example, when using Nvidia's CUDA platform, calculations with double precision can take, depending on hardware, from 2 to 32 times as long to complete compared to those done using single precision.[4]

Additionally, many mathematical functions (e.g., sin, cos, atan2, log, exp and sqrt) need more computations to give accurate double-precision results, and are therefore slower.

Precision limitations on integer values

  • Integers from ?253 to 253 (?9,007,199,254,740,992 to 9,007,199,254,740,992) can be exactly represented.
  • Integers between 253 and 254 = 18,014,398,509,481,984 round to a multiple of 2 (even number).
  • Integers between 254 and 255 = 36,028,797,018,963,968 round to a multiple of 4.
  • Integers between 2n and 2n+1 round to a multiple of 2n?52.

Implementations

Doubles are implemented in many programming languages in different ways such as the following. On processors with only dynamic precision, such as x86 without SSE2 (or when SSE2 is not used, for compatibility purpose) and with extended precision used by default, software may have difficulties to fulfill some requirements.

C and C++

C and C++ offer a wide variety of arithmetic types. Double precision is not required by the standards (except by the optional annex F of C99, covering IEEE 754 arithmetic), but on most systems, the double type corresponds to double precision. However, on 32-bit x86 with extended precision by default, some compilers may not conform to the C standard or the arithmetic may suffer from double rounding.[5]

Fortran

Fortran provides several integer and real types, and the 64-bit type real64, accessible via Fortran's intrinsic module iso_fortran_env, corresponds to double precision.

Common Lisp

Common Lisp provides the types SHORT-FLOAT, SINGLE-FLOAT, DOUBLE-FLOAT and LONG-FLOAT. Most implementations provide SINGLE-FLOATs and DOUBLE-FLOATs with the other types appropriate synonyms. Common Lisp provides exceptions for catching floating-point underflows and overflows, and the inexact floating-point exception, as per IEEE 754. No infinities and NaNs are described in the ANSI standard, however, several implementations do provide these as extensions.

Java

On Java before version 1.2, every implementation had to be IEEE 754 compliant. Version 1.2 allowed implementations to bring extra precision in intermediate computations for platforms like x87. Thus a modifier strictfp was introduced to enforce strict IEEE 754 computations. Strict floating point has been restored in Java 17.[6]

JavaScript

As specified by the ECMAScript standard, all arithmetic in JavaScript shall be done using double-precision floating-point arithmetic.[7]

JSON

The JSON data encoding format supports numeric values, and the grammar to which numeric expressions must conform has no limits on the precision or range of the numbers so encoded. However, RFC 8259 advises that, since IEEE 754 binary64 numbers are widely implemented, good interoperability can be achieved by implementations processing JSON if they expect no more precision or range than binary64 offers.[8]

Rust and Zig

Rust and Zig have the f64 data type.[9][10]

See also

Notes and references

  1. ^ William Kahan (1 October 1997). "Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic" (PDF). p. 4. Archived (PDF) from the original on 8 February 2012.
  2. ^ Savard, John J. G. (2018) [2005], "Floating-Point Formats", quadibloc, archived from the original on 2025-08-06, retrieved 2025-08-06
  3. ^ "pack – convert a list into a binary representation". Archived from the original on 2025-08-06. Retrieved 2025-08-06.
  4. ^ "Nvidia's New Titan V Pushes 110 Teraflops From A Single Chip". Tom's Hardware. 2025-08-06. Retrieved 2025-08-06.
  5. ^ "Bug 323 – optimized code gives strange floating point results". gcc.gnu.org. Archived from the original on 30 April 2018. Retrieved 30 April 2018.
  6. ^ Darcy, Joseph D. "JEP 306: Restore Always-Strict Floating-Point Semantics". Retrieved 2025-08-06.
  7. ^ ECMA-262 ECMAScript Language Specification (PDF) (5th ed.). Ecma International. p. 29, §8.5 The Number Type. Archived (PDF) from the original on 2025-08-06.
  8. ^ Bray, Tim (December 2017). "The JavaScript Object Notation (JSON) Data Interchange Format". Internet Engineering Task Force. Retrieved 2025-08-06.
  9. ^ "Data Types - The Rust Programming Language". doc.rust-lang.org. Retrieved 10 August 2024.
  10. ^ "Documentation - The Zig Programming Language". ziglang.org. Retrieved 10 August 2024.
湿疹为什么要查肝功能 亢奋是什么意思 酒吧营销是做什么的 核桃壳有什么用 川芎的功效与作用是什么
利普刀是什么手术 两个子是什么字 皮肤白斑是什么原因 浇头是什么意思 食是代表什么生肖
便秘吃什么润肠通便 为什么越吃越饿 hgb是什么意思 高等院校是什么意思 坐骨神经痛吃什么药好得快
高筋面粉适合做什么 吃什么降血脂最快最好 空调买什么品牌的好 驴打滚是什么意思 太监是什么意思
童心未泯是什么意思hcv7jop5ns2r.cn 早上9点半是什么时辰hcv8jop9ns6r.cn 农历10月22日是什么星座hcv7jop4ns5r.cn 办身份证要带什么ff14chat.com 羟苯乙酯是什么hcv9jop0ns0r.cn
黄雀是什么鸟hcv8jop2ns5r.cn 断层是什么意思fenrenren.com 吃葵花籽有什么好处和坏处吗hcv8jop7ns4r.cn 狮子是什么科hcv9jop6ns5r.cn 五月11号是什么星座hcv8jop3ns7r.cn
may是什么意思hcv8jop6ns6r.cn 天杀的是什么意思hcv9jop7ns2r.cn pm是什么的缩写creativexi.com 跟腱是什么hcv8jop0ns1r.cn 灰指甲有什么特效药可以治好hcv7jop9ns5r.cn
英雄难过美人关是什么生肖hcv7jop5ns0r.cn 小资生活是什么意思hcv8jop7ns5r.cn 口臭口干口苦是什么原因hcv9jop3ns4r.cn 四大皆空是指什么hcv7jop6ns7r.cn 空洞是什么意思hcv8jop0ns3r.cn
百度