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...
1e5
is a number expressed using scientific notation, specifically E notation, and it means 1 multiplied by 10 to the 5th power (the 'e' meaning 'exponent').
So 1e5
equals 1*10^5
and equals 1*100000
and is equal to 100000
.
The notations are interchangeable and represent the same value. However, in certain languages, there might be a subtle difference in the type of number expressed, 1e5 being a float and 10000 being an integer.