RosettaCodeData/Task/Integer-sequence/REXX/integer-sequence.rexx

49 lines
3.3 KiB
Rexx
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
/*count all the protons, electrons, & whatnot in the universe, and then */
/*keep counting. According to some pundits in-the-know, one version of */
/*the big-bang theory is that the universe will collapse back to where */
/*it started, and this computer program will be still counting. */
/*┌────────────────────────────────────────────────────────────────────┐
Count all the protons (and electrons!) in the universe, and then
keep counting. According to some pundits in-the-know, one version
of the big-bang theory is that the universe will collapse back to
where it started, and this computer program will still be counting.
2015-02-20 00:35:01 -05:00
According to Sir Arthur Eddington in 1938 at his Tamer Lecture at
Trinity College (Cambridge), he postulated that there are exactly
2013-04-10 21:29:02 -07:00
2015-02-20 00:35:01 -05:00
136 2^256
2013-04-10 21:29:02 -07:00
protons in the universe and the same number of electrons, which is
equal to around 1.57477e+79.
2015-02-20 00:35:01 -05:00
Although, a modern estimate is around 10^80.
2013-04-10 21:29:02 -07:00
One estimate of the age of the universe is 13.7 billion years,
or 4.32e+17 seconds. This'll be a piece of cake.
*/
numeric digits 1000000000 /*just in case the universe slows down. */
/*this version of a DO loop increments J*/
do j=1 /*Sir Eddington's number, then a googol.*/
say j /*first, destroy some electrons. */
end
say 42 /*(see below for explanation of 42.) */
exit
/*This REXX program (as it will be limited to the NUMERIC DIGITS above, */
/*will only count up to 1000000000000000000000000000000000000000000... */
/*000000000000000000000000000000000000000000000000000000000000000000000 */
/* ... for another (almost) one billion more zeroes (then subtract 1).*/
/*if we can count 1,000 times faster than the fastest PeeCee, and we */
/*started at the moment of the big-bang, we'd be at only 1.72e+28, so */
/*we still have a little ways to go, eh? */
/*To clarify, we'd be 28 zeroes into a million zeroes. If PC's get */
/*1,000 times faster again, that would be 31 zeroes into a million. */
/*It only took Deep Thought 7.5 million years to come up with the */
/*answer to everything (and it double-checked the answer). It was 42.*/