整数存储怎么转化为浮点数_非整数值如何存储在浮点数中(以及为什么要浮点数)...

整数存储怎么转化为浮点数

by Shukant Pal

通过Shukant Pal

非整数值如何存储在浮点数中(以及为什么要浮点数) (How non-integer values are stored in a float (and why it floats))

Did you ever think how computers work on floating-point numbers? I mean — where does the decimal point go? What if you’re asked in an interview?

您是否曾经想到计算机如何在浮点数上工作? 我的意思是-小数点在哪里? 如果在面试中被问到怎么办?

The IEEE 754 floating-point standard defines how non-integer values are encoded in fixed-size types, like the C++ float and the JavaScript Number. It gives us five different formats — but no worries, all of them…

IEEE 754浮点标准定义了如何将非整数值编码为固定大小的类型,例如C ++ float和JavaScript Number。 它为我们提供了五种不同的格式-不用担心,所有这些……

翻译自: https://www.freecodecamp.org/news/how-non-integer-values-are-stored-in-a-float-and-why-it-floats-902effacbfb9/

整数存储怎么转化为浮点数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值