Hi,
#include <stdio.h>
int main()
{
double t=1.6e55;
printf("%f\n",t);
printf("%f\n",1.6e55);
printf("%f\n",1.6e54);
printf("%f\n",1.6e53);
printf("%f\n",1.6e52);
printf("%f\n",1.6e42);
printf("%f\n",1.6e30);
printf("%f\n",1.6e29);
}
% xlc exp.c -g -o aaix
% ./aaix
16000000000000001252664646473500000000000000000000000000.000000
16000000000000001252664646473500000000000000000000000000.000000
1599999999999999989153517878980000000000000000000000000.000000
159999999999999998915351787898000000000000000000000000.000000
15999999999999999891535178789800000000000000000000000.000000
1600000000000000009920138320650000000000000.000000
1599999999999999862930413715460.000000
159999999999999993329915789312.000000
But in linux:
% gcc exp.c -m32 -o amd
% ./amd
16000000000000001252664646473539901476885764798177869824.000000
16000000000000001252664646473539901476885764798177869824.000000
1599999999999999989153517878978604762338733507110502400.000000
159999999999999998915351787897860476233873350711050240.000000
15999999999999999891535178789786047623387335071105024.000000
1600000000000000009920138320652453111922688.000000
1599999999999999862930413715456.000000
159999999999999993329915789312.000000
How do I match aix results with that of linux? What is the problem here?
#include <stdio.h>
int main()
{
double t=1.6e55;
printf("%f\n",t);
printf("%f\n",1.6e55);
printf("%f\n",1.6e54);
printf("%f\n",1.6e53);
printf("%f\n",1.6e52);
printf("%f\n",1.6e42);
printf("%f\n",1.6e30);
printf("%f\n",1.6e29);
}
% xlc exp.c -g -o aaix
% ./aaix
16000000000000001252664646473500000000000000000000000000.000000
16000000000000001252664646473500000000000000000000000000.000000
1599999999999999989153517878980000000000000000000000000.000000
159999999999999998915351787898000000000000000000000000.000000
15999999999999999891535178789800000000000000000000000.000000
1600000000000000009920138320650000000000000.000000
1599999999999999862930413715460.000000
159999999999999993329915789312.000000
But in linux:
% gcc exp.c -m32 -o amd
% ./amd
16000000000000001252664646473539901476885764798177869824.000000
16000000000000001252664646473539901476885764798177869824.000000
1599999999999999989153517878978604762338733507110502400.000000
159999999999999998915351787897860476233873350711050240.000000
15999999999999999891535178789786047623387335071105024.000000
1600000000000000009920138320652453111922688.000000
1599999999999999862930413715456.000000
159999999999999993329915789312.000000
How do I match aix results with that of linux? What is the problem here?