Talk:Day of the week: Difference between revisions
Content added Content deleted
(32bit and 64bit... no limit (for human's concern)) |
(→Same prog on different machine: another kind of limit?) |
||
Line 8: | Line 8: | ||
Dec. 25 falls on Sunday through 2121. Let's see if any get this wrong. --[[User:64.238.49.65|64.238.49.65]] 15:11, 12 December 2008 (UTC) |
Dec. 25 falls on Sunday through 2121. Let's see if any get this wrong. --[[User:64.238.49.65|64.238.49.65]] 15:11, 12 December 2008 (UTC) |
||
:The date is internally stored as seconds from the year 1970 (more or less). I've computed (2038-1970)*365*24*3600, obtaining 2144448000; now, we are near the limit for a 32bit signed integer... but not to the limit of a 64bit signed integer. I take a note for the day I will ask myself is it is worth buying a 64bit hardware :) About the 2121, 64bit systems still can :) With a 64bit signed int, you can really go a lot further --[[User:ShinTakezou|ShinTakezou]] 15:22, 12 December 2008 (UTC) |
:The date is internally stored as seconds from the year 1970 (more or less). I've computed (2038-1970)*365*24*3600, obtaining 2144448000; now, we are near the limit for a 32bit signed integer... but not to the limit of a 64bit signed integer. I take a note for the day I will ask myself is it is worth buying a 64bit hardware :) About the 2121, 64bit systems still can :) With a 64bit signed int, you can really go a lot further (I wonder if you thought about a limit in the way the day is found) --[[User:ShinTakezou|ShinTakezou]] 15:22, 12 December 2008 (UTC) |
Revision as of 15:23, 12 December 2008
Same prog on different machine
Yes, and I see it is a 64bit machine, isn't it? I am still on plain 32 bit! --ShinTakezou 14:55, 12 December 2008 (UTC)
- True. But it is all worth knowing :-) --Paddy3118 14:56, 12 December 2008 (UTC)
Hey - why not make it interesting and have the program print the years when Dec. 25 falls on Sunday through 2121. Let's see if any get this wrong. --64.238.49.65 15:11, 12 December 2008 (UTC)
- The date is internally stored as seconds from the year 1970 (more or less). I've computed (2038-1970)*365*24*3600, obtaining 2144448000; now, we are near the limit for a 32bit signed integer... but not to the limit of a 64bit signed integer. I take a note for the day I will ask myself is it is worth buying a 64bit hardware :) About the 2121, 64bit systems still can :) With a 64bit signed int, you can really go a lot further (I wonder if you thought about a limit in the way the day is found) --ShinTakezou 15:22, 12 December 2008 (UTC)