return int64_max as double,result is INT64_MIN

151 Views Asked by At
double GetMax()
{
   return INT64_MAX;  
}

int64_t a = GetMax();

then i get a=0x800000000.... how can i get the INT64_MAX as result. the range of double is greater than int64_t,why it does not work?

0

There are 0 best solutions below