What is the e + 000 number?

I have a data file full of numbers that I load into a float vector. However, the numbers in the data file are of the form -4.60517025e+000 , but are read as -4.60517

What number should -4.60517025e+000 be?

+2
source share
1 answer

The number -4.60517025e + 000 is interpreted as -4.60517025 x times; 10 0 = -4.60517025.

In general, the form number

 AeB 

interpreted as A & times; 10 V.

In your case, the file is read correctly, but when displayed, the numbers are rounded to a certain number of decimal points. You can use the stream manipulators to display them in their original form.

Hope this helps!

+9
source

All Articles