e + 000是多少? [英] What number is e+000?

查看:417
本文介绍了e + 000是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个充满数字的数据文件,我正在将这些数字加载到浮点向量中.但是,数据文件中的数字的格式为-4.60517025e+000,但其读取方式类似于-4.60517

I have a data file full of numbers I'm loading into a vector of floats. However, the numbers in the data file are of the form -4.60517025e+000 but are being read in like -4.60517

-4.60517025e+000应该是多少?

推荐答案

数字-4.60517025e + 000被解释为-4.60517025× 10 0 = -4.60517025.

The number -4.60517025e+000 is interpreted as -4.60517025 × 100 = -4.60517025.

通常,许多形式

AeB

被解释为A× 10 B .

is interpreted as A × 10B.

对于您来说,文件已被正确读取,但是显示时,数字会四舍五入到小数点后的位数.您可以使用流操纵器以其初始形式显示它们.

In your case, the file is being read properly, but the numbers are being rounded to some number of decimal points when being displayed. You can use stream manipulators to display them in their initial form.

希望这会有所帮助!

这篇关于e + 000是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆