1e-18

Started by
5 comments, last by Fruny 17 years, 9 months ago
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
Advertisement
1e-18 is 1 * 10-18 or 0.000000000000000001
5.3e16 is 5.3 * 1016 or 53000000000000000
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
1e-18 is 1 × 10-18. 1e16 is 1 × 1016.
ah, that easy! great thanks. Is that an ieee standard?
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.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
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!
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.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement