Consider the following program: #include #include #include int main(int argc, char **argv) { uint32_t a = strtoul(argv[1], 0, 0); uint32_t b = strtoul(argv[2], 0, 0); double d = a-b; printf("%f\n", d); return 0; } $ ./a.out 5 6 4294967295.000000 This is what I expected. Since a-b would be negative, the result is a-b+2^32. However, if I replace uint32_t ...