I"ve checked out some password online and I"m make the efforts to work out what it is doing. In particular, I"ve never ever seen "1e" convention before.

You are watching: What does 1e-6 mean

time_t currentTime;time(¤tTime);uint64_t currentTime = (uint64_t)currentTime * 1e6;



In C, 1e6 has actually type twin and its worth is 1 time 10 elevated to the sixth power. That is indistinguishable to 1000000.0.

Do not acquire fooled through the various other answers: 1e6 does not typical the same thing as 1000000 in C, because 1e6 has type twin while 1000000 will have some integer type. There are big differences in actions between floating-point types like double and integers types.

The syntax for composing numbers favor 1e6 is defined in the "Floating constants" section of the C11 specification (and previously versions too). It"s type of favor scientific notation.

improve this price
answer Apr 18 "19 at 23:58

David GraysonDavid Grayson
73k2323 gold badges140140 silver badges177177 bronze badges
add a comment |
That is 1e6, not le6, and also it way 1 * 10^6 or 1000000.0

It is scientific notation.

enhance this price
edited Apr 19 "19 at 0:14
answer Apr 18 "19 in ~ 23:41

18322 silver- badges1111 bronze badges
include a comment |
I"ve checked out some password online and I"m trying to job-related out what the is doing. In particular, I"ve never ever seen "1e" convention before.

As others have mentioned, practically speaking, 1e6 is scientific notation for 10^6 which is 1000000 or better known together 1 million. Yet as has currently been mentioned, by David, this is actually treated together a dual in C and the value is actually 1000000.0.

But ns feel prefer these answers only emphasis on that details piece the the code you detailed and not the entirety so I wanted to provide some extr context because that you because you room trying to job-related out what the password is doing.

For these lines:

time_t currentTime;time(¤tTime);time take away a tip time_t and operates ~ above it, presumably composing some semblance of time to it.

See more: Why Did The Renaissance Originated In Italy Because, Italian Renaissance

The following line is actually illegal because currentTime was already declared so let"s do a small modification:

uint64_t convertedTime = (uint64_t)currentTime * 1e6;This line converts time_t currentTime come an unsigned 64-bit integer then multiplies that by 1e6 or 1000000.0. This is likely being done for unit conversion. Because that instance, let"s i think time wrote the time in microseconds (1e-6, 10^-6, or .000001) to currentTime so multiplying it by 1e6 will give you seconds. And also I say the just because of what shows up to be a unit conversion right here not since I actually know what time did (i.e. I"m taking the password at face value here).