int s = 1e9;
What is type of 1e9 and how precise is it? (Is it exactly equal to 1000000000?)
Printing type of a value/variable to stdout would be useful if it’s possible.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1e9is adoublethat has an exact representation in the IEEE floating point representation. The C++ standard doesn’t mandate IEEE floating point.sis anint, so thedoublevalue will be automatically converted to anint. How this takes place is to some extent up to the implementation. On most machines nowadays, this conversion meansswill be given an initial value of 1000000000.