I have seen in some codes that people define a variable and assign values like 1e-8 or 1e5.
for example
const int MAXN = 1e5 + 123;
What are these numbers? I couldn't find any thing on the web...
As others have mentioned, practically speaking, 1e6 is scientific notation for 10^6 which is 1000000 or better known as 1 million. But as has already been mentioned, by David, this is actually treated as a double in C and the value is actually 1000000.0 .
1 million xp. This is similar to exponential notation on your calculator; in this case the “1e*03” part is like saying 10 to the 3rd power, or 1000. So you get 1000k experience, or 1 million.
To write a float literal in E notation, type a number followed by the letter e and then another number. Python takes the number to the left of the e and multiplies it by 10 raised to the power of the number after the e . So 1e6 is equivalent to 1×10⁶.
1e5
is a number expressed using scientific notation and it means 10 to the 5th power (the e meaning 'exponent')
so 1e5
is equal to 100000
, both notations are interchangeably meaning the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With