Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of number 1e5?

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...

like image 839
Kadaj13 Avatar asked Oct 03 '14 06:10

Kadaj13


People also ask

How do you write 1e 6?

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 .

What does 1e 3 mean?

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.

What does 1e6 mean in Python?

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⁶.


1 Answers

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.

like image 88
PA. Avatar answered Sep 23 '22 22:09

PA.