Hi,
My OS is:
cronos:jdiaz:tm p>uname -a
HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license
I compile in 64-bits mode the program below:
cronos:jdiaz:tm p>cat kk.C
#include <iostream.h>
#include <limits>
int main()
{
long l_min = numeric_limits< long>::min();
long l_max = numeric_limits< long>::max();
double d_min = numeric_limits< double>::min();
double d_max = numeric_limits< double>::max();
cout << sizeof(long) << " " << sizeof(double) << endl;
cout << l_min << " " << l_max << " " << d_min << " " << d_max <<
endl;
return 0;
}
cronos:jdiaz:tm p>a.out
8 8
-922337203685477 5808 922337203685477 5807 2.22507e-308 1.79769e+308
The double and long types have the same size, but the double limits
are bigger. Can anyone explein this to me ?
Thanks,
Jose Luis.
My OS is:
cronos:jdiaz:tm p>uname -a
HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license
I compile in 64-bits mode the program below:
cronos:jdiaz:tm p>cat kk.C
#include <iostream.h>
#include <limits>
int main()
{
long l_min = numeric_limits< long>::min();
long l_max = numeric_limits< long>::max();
double d_min = numeric_limits< double>::min();
double d_max = numeric_limits< double>::max();
cout << sizeof(long) << " " << sizeof(double) << endl;
cout << l_min << " " << l_max << " " << d_min << " " << d_max <<
endl;
return 0;
}
cronos:jdiaz:tm p>a.out
8 8
-922337203685477 5808 922337203685477 5807 2.22507e-308 1.79769e+308
The double and long types have the same size, but the double limits
are bigger. Can anyone explein this to me ?
Thanks,
Jose Luis.
Comment