I have an issue in printing a large number in a c program. Please find below the code snippet :
int main()
{
double temp = 0.0;
temp = pow(2, 2000);
printf("The value of temp is %lfn", temp);
return 0;
}
I compiled and ran as below:
$ gcc test.c -o test
$ ./test
The value of temp is inf
But for the same expression, I am able to get the value from python,
$ python
>>> pow(2,2000)
1148130..........................49029376L
>>>
Can any body help me with that option?