Assume my system as 32 bit machine. Considering this if I use long int for n>63 I will get my value as 0. How to solve it?
Share
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.
doubleis perfectly capable of storing powers of two up to 1023 exactly. Don’t let someone tell you that floating point numbers are somehow always inexact. This is a special case where they aren’t!Some output of the program: