Why does this statement:
std::cout << 4611686018427387905 - pow(2.0, 62) << std::endl;
or:
unsigned long long int value = 4611686018427387905; //2^62 + 1
unsigned long long int result = value - pow(2.0, 62);
evaluate to 0 instead of 1? An unsigned long long int can hold up to 2^64 values so I don't think that is the issue. This also happens with other values that are very large.