Loading
Commits on Source 3
-
Sanjeev Gupta authored
On a gcc 8.3 on a 32-bit system, Size of int: 4 bytes Size of long int: 4 bytes Size of long long int: 8 bytes Size of float: 4 bytes Size of double: 8 bytes Size of long double: 12 bytes Size of char: 1 byte Explicitly cast to (long double) to prevent overflow of the seconds in a 13-bit week number
-
Sanjeev Gupta authored
-
Sanjeev Gupta authored
Gary pointed out the dangers of using a float to store this value. So (long double) is out. (long long) is 8 bytes, but we can only use 4, because it is signed. Use (unsigned long long), which gives us the full 8 bytes.