I"ve viewed some password online and also I"m do the efforts to work out what that is doing. In particular, I"ve never 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 double and its value is 1 times 10 increased to the sixth power. That is identical to 1000000.0.

Do not acquire fooled through the various other answers: 1e6 does not median the very same thing as 1000000 in C, due to the fact that 1e6 has actually type double while 1000000 will have actually some essence type. There are huge differences in behavior between floating-point varieties like dual and integers types.

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

re-publishing
monitor
answer Apr 18 "19 in ~ 23:58

David GraysonDavid Grayson
1
4
That is 1e6, no le6, and also it way 1 * 10^6 or 1000000.0

It is scientific notation.

re-superstructure
monitor
edited Apr 19 "19 at 0:14
reply Apr 18 "19 in ~ 23:41

devjocodevjoco
1
3
I"ve watched some password online and I"m make the efforts to job-related out what that is doing. In particular, I"ve never seen "1e" convention before.

As others have actually mentioned, virtually speaking, 1e6 is clinical notation because that 10^6 which is 1000000 or much better known together 1 million. Yet as has already been mentioned, by David, this is actually treated as a double in C and the worth is actually 1000000.0.

But i feel favor these answers only emphasis on that details piece the the password you detailed and no the totality so I want to carry out some added context for you since you are trying to work out what the code is doing.

For these lines:

time_t currentTime;time(¤tTime);time take away a reminder time_t and also operates ~ above it, presumably writing some sembeant of time come it.

See more: Why Does My Urine Smell Like Cheerios, Why Does My Pee Smell Like Cheerios

The next line is in reality illegal because currentTime was already declared therefore let"s make a tiny modification:

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