In one simple problem, I encountered such a record of the number "1е-3". There was the following code:

int a = 15; int b = 4; float c = a / b; double d = a * 1e-3 + c; 

I tried to write 1 variable separately - double g=1e-3; brought to the console, it turned out 0.001. Tell me please, what kind of recording is this? Previously, I have not come across this

1 answer 1

Write e-3 - This is multiplying by 10 to -3 degree . In some cases, such a record can occur in binary number system, then it will mean multiplication by 2 to the power of -3 (but you are unlikely to come across this). It is clear that instead of -3 there can be any integer. For a double data type, the power of tens can usually be within three hundred (both plus and minus). The letter e (or E) is usually decoded as "Exponent".