当前位置:网站首页>【JVM】JVM表示浮点数
【JVM】JVM表示浮点数
2022-07-28 08:32:00 【檀越剑指大厂】
JVM表示浮点数
浮点数的组成:符号位、指数位、尾数位。
符号位: 占 1 位,表示正负数;
指数位: 占 8 位;
尾数位: 占 23 位。
浮点数的表示:
- 取值: sflag * m * 2(e-127)
- sflag :符号位。 s = 0, sflag = 1; s = 1, sflag = -1
- m : 尾数位。实际占用 23 位,但是根据 e 的取值,有 24 位。当 e 全为 0 时,尾数位附加 0,否则附加 1
- e :指数位。
具体解析:(以 - 5 为例)
内部形式:1 10000001 01000000000000000000000
符号位:s = 1 得出 sflag = -1;
指数位: 二进制为 10000001,得出十进制 e = 129;
尾数位: 二进制为 01000000000000000000000, 得出: m = 20 + 2-2 = 1.25;
最终取值: sflag * m * 2(e-127) = -1 * 1.25 * 2(129 - 127) = -5
边栏推荐
- 【英语考研词汇训练营】Day 15 —— analyst,general,avoid,surveillance,compared
- 力扣题(1)—— 两数之和
- 2022年起重机司机(限桥式起重机)考试题库及模拟考试
- Code management platform SVN deployment practice
- opencv4.60版本安装和配置
- 2022年安全员-B证考试模拟100题及答案
- ES6 let与const
- The new mode of 3D panoramic display has become the key to breaking the game
- Realize batch data enhancement | use of keras imagedatagenerator
- 01 tensorflow calculation model (I) - calculation diagram
猜你喜欢

Implementation principle of golang synergy

网络层的IP协议

linux初始化mysql时报错 FATAL ERROR: Could not find my-default.cnf

Learn to draw with nature communications -- complex violin drawing

训练一个自己的分类 | 【包教包会,数据都准备好了】

12 common design ideas of design for failure

Design for failure常见的12种设计思想

修改虚拟机IP地址

No one wants to tell the truth about kubernetes secret

JSON 文件存储
随机推荐
象棋机器人夹伤7岁男孩手指,软件测试工程师的锅?我笑了。。。
Get started quickly with flask (I) understand the framework flask, project structure and development environment
Completion report of communication software development and Application
LeetCode_406_根据身高重建队列
TXT文本文件存储
Data analysis interview question summary
Hundreds of billions of it operation and maintenance market has come to the era of speaking by "effect"
快速上手Flask(一) 认识框架Flask、项目结构、开发环境
Machine learning: self paced and fine tuning
v-bind指令的详细介绍
Larkapi access credentials overview
Kubernetes data persistence scheme
Kubernetes cluster configuration DNS Service
Huid learning 7: Hudi and Flink integration
Warehouse of multiple backbone versions of yolov5
Path and attribute labels of picture labels
A new method of exposing services in kubernetes clusters
1.5 merge\rebase\revert\stash\branch
Mysql5.7.38 start keepalived in the container
App加速读取显示IPFS图片的解决方案和实现