How are numbers greater than 2^32 handled by a 32 bit machine?
问题 I am trying to understand how calculations involving numbers greater than 2 32 happen on a 32 bit machine. C code $ cat size.c #include<stdio.h> #include<math.h> int main() { printf ("max unsigned long long = %llu\n", (unsigned long long)(pow(2, 64) - 1)); } $ gcc output $ gcc size.c -o size $ ./size max unsigned long long = 18446744073709551615 $ Corresponding assembly code $ gcc -S size.c -O3 $ cat size.s .file "size.c" .section .rodata.str1.4,"aMS",@progbits,1 .align 4 .LC0: .string "max