I've got a problem with diplaying big doubles.
Here's a code I've prepared:
#include <stdio.h>
#include <float.h>
#define M_PI 3.141592653589793238462643383279502884197169399375105820974944
int main()
{
printf("%.70f\n",M_PI);
return 0;
}
It displays:
3.1415926535897931159979634685441851615905761718750000000000000000000000
But once I change M_PI for DBL_MAX everything is shown correctly. What's worse is that when dot in M_PI definition is removed (leaving a really big number) the result is 0.
What do I do wrong? How can I display some huge numbers?