mnopix
asked on
Range of double
Hi,
This is about the range of data type double. What will be maximum possible value that could be assigned to a double type from a long int without loss of data.
Thank you
mnopix
This is about the range of data type double. What will be maximum possible value that could be assigned to a double type from a long int without loss of data.
Thank you
mnopix
ASKER
Hi nonubik,
Thank u for explaining the inner storage details of double.
Let me explain my problem a bit more:
What will be maximum possible value that could be assigned to a double type from a long int without loss of data.
long longVal = xx;
double doubleVal;
doubleVal = longVal ; // what will be the max val that could be assigned without loss of data.
i.e the maximum I can keep safely in longVal(xx). Pls give it in a non scientific notation.
Thank u for explaining the inner storage details of double.
Let me explain my problem a bit more:
What will be maximum possible value that could be assigned to a double type from a long int without loss of data.
long longVal = xx;
double doubleVal;
doubleVal = longVal ; // what will be the max val that could be assigned without loss of data.
i.e the maximum I can keep safely in longVal(xx). Pls give it in a non scientific notation.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Microsoft Specific —>
The double type contains 64 bits: 1 for sign, 11 for the exponent, and 52 for the mantissa. Its range is +/–1.7E308 with at least 15 digits of precision.
END Microsoft Specific