Sign in to follow this  
Katachi

1e-18

Recommended Posts

Hello, I would like to know what this figure tells me? I´ve seen it quite often recently in C++ code and I would like to know what it defines. 1e-18 or 1e16 Thanks ia! Sam

Share this post


Link to post
Share on other sites
1e-18 is 1 * 10-18 or 0.000000000000000001
5.3e16 is 5.3 * 1016 or 53000000000000000

Share this post


Link to post
Share on other sites
Quote:
Original post by Katachi
Is that an ieee standard?


As far as I know, the IEEE standard only controls how the floating point numbers are stored internally, not how they are displayed, which may vary depending on the locale used. It is, however a common way to display them.

I recently had trouble interfacing with a Fortran program, which displayed them differently, forcing me to manually parse the numbers in the files it output.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Quote:
Original post by Katachi
Is that an ieee standard?


As far as I know, the IEEE standard only controls how the floating point numbers are stored internally, not how they are displayed, which may vary depending on the locale used. It is, however a common way to display them.

I recently had trouble interfacing with a Fortran program, which displayed them differently, forcing me to manually parse the numbers in the files it output.


hmm, I thought the IEEE standard would define how the FPU would interpret them and that should result in equal results. But I am not sure, could be the storage only too.

But when it´s common (and it appears to be so) to use it, I´ll be using it too. :)

thx!

Share this post


Link to post
Share on other sites
Quote:
Original post by Katachi
hmm, I thought the IEEE standard would define how the FPU would interpret them and that should result in equal results.


The FPU isn't responsible for the display of floating-point numbers as human-readable text.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this