Math.h defines pi as:
#define M_PI 3.1415926535897 9323846
Yet I get the fallowing result with the following source.
C:\BC5\BIN>read s pia.c
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("Pi to 32 places is %.31f\n", M_PI);
return 0;
}
C:\BC5\BIN>pia
Pi to 32 places is 3.1415926535897 931200000000000 000
C:\BC5\BIN>
#define M_PI 3.1415926535897 9323846
Yet I get the fallowing result with the following source.
C:\BC5\BIN>read s pia.c
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("Pi to 32 places is %.31f\n", M_PI);
return 0;
}
C:\BC5\BIN>pia
Pi to 32 places is 3.1415926535897 931200000000000 000
C:\BC5\BIN>
Comment