changing youtube video

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Sat Jan 19 22:56:15 UTC 2013


| From: James Knott <james.knott-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org>

| BTW, did you know there are "museums" in the U.S. that show humans and
| dinosaurs as contemporaries.  That is the sort of absolute garbage that comes
| from religious beliefs.  You have to be delusional to believe that nonsense.
| No ifs ands or buts.

Actually, it is caused by using an unsigned integral type for time_t
and using 4004BC as your Epoch.

At least they were using "saturating" arithmetic.  In saturating
arithmetic, an unsigned calculation that would underflow yields 0 and
a calculation that would overflow yields MAXINT.  Most computer adders
"wrap around" on underflow or overflow instead.

There's no telling when those darned dinosaurs would show up if you
used conventional modular arithmethic on 32-bit time_t.

Lets say you used 64-bit unsigned time_t instead of signed 32-bit
time_t.  Epoch of 4004 BC vs 1970 AD isn't significant with our
accuracy.  I'll use the (non-existant!) date 0 AD (1 BC was
immediately followed by 1 AD).

	65M BC == -2051200190000000 seconds BC
	= 18444692873519551616 (mod 2^64)
	= about 584B AD

So we'd be safe.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list