J
jose luis fernandez diaz
Hi,
My OS is:
cronos:jdiaz:tmp>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:tmp>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:tmp>a.out
8 8
-9223372036854775808 9223372036854775807 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:tmp>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:tmp>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:tmp>a.out
8 8
-9223372036854775808 9223372036854775807 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.