当前位置:网站首页>The accuracy of float
The accuracy of float
2022-07-24 22:28:00 【ima_ zhan】
I found an interesting problem today , use float.Parse("-0.03"); Got float The type data is -0.03, But take 100 Assign a value to an integer and it becomes -2.
float fval = float.Parse("-0.03");
int ival = (int)(fval*100);
If you use double Is no problem . stay 64 Bit win7 There is no problem on the system .
边栏推荐
- Helm —— 强大的 Kubernetes 应用的包管理工具
- [cloud native] Devops (IV): integrated sonar Qube
- Kubernetes v1.24 is deployed based on containerd
- Function default parameter pit avoidance Guide
- How to refine the top products of the website in the top 10 of the list for three consecutive months?
- From Fibonacci sequence to matrix fast power technique
- [postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical
- Maixll dock QR code recognition
- Poj2308 continuously look at dfs+bfs+ optimization
- My love lesson 2 - remove webpage pop-up
猜你喜欢

Morris traversal

Ranking of engineering project management software

Glidemodule appglidemodule and generated API details

IndexTree

Ue5 reports an error using the plug-in quixel Bridge

Gradle learning - gradle advanced instructions

C # use SQLite

Im instant messaging develops ten million level concurrent long connection Gateway Technology

CAD break command

CAD copy commands
随机推荐
有序表之AVL树
What are the methods of knowledge map relation extraction
From violent recursion to dynamic programming, memory search
Archsummit: evolution of the underlying framework of cherished microservices
The kettle job implementation runs a kettle conversion task every 6S
ASP. Net core 6.0 data validation based on model validation
Low code that democratizes software development
Gradle learning - getting started with gradle
Win10 解base64
[postgraduate entrance examination vocabulary training camp] day 12 - native, separate, figure, contribution, categories, assessment, propose
What do GB, MB and KB mean respectively. What are the sizes
10 key points and 5 measures for good project management
IndexTree2D
Gradle learning set integration
《JUC并发编程 - 高级篇》05 -共享模型之无锁 (CAS | 原子整数 | 原子引用 | 原子数组 | 字段更新器 | 原子累加器 | Unsafe类 )
Shallow copy deep copy
头脑风暴之——利用reduce方法重构concat函数
PCL点云处理之随机采样抽稀RandomSample(六十)
General syntax and classification of SQL language (II)
DDoS attack classification