philosophy :: psychology :: theology :: technology
I was relieved to find that the GRE (the grad-equivalent of the SAT—it’s even by the same people!) has only sixth-through-ninth-grade maths on it; but in my review of some old concepts, I stumbled across factorials, which I last dealt with in programming recursive methods that would take a value and return its factorial only after a memory-and-proc-intensive computation. The factorial of any number is defined as that number times one less than it, times one less, and so forth, all the way down to 1: or, 1 times 2 times 3 and so on until we get to the number itself. Hence, Five factorial (written “5!”) equals 120, because 5*4*3*2*1==120.
But what about 0! ? Prima facie it makes sense that 0! would be 0, because 0*1==0, but it’s not. There is an explanation (which for the curious can be found here) as to why 0!==1, but I think we can all agree it doesn’t seem immediately intuitive.
This provides a funny, perhaps ridiculous, yet telling illustration of Creation. God created ex nihilo Being, i.e., all that exists, by speaking. If we may exercise a bit of comedic license, we can say that God shouted (!) at zero (nothingness) and 1 (Being) was the result; and at first it doesn’t make intuitive sense, but if we know the underlying algorithym (God’s character) everything just falls right into place.
I was relieved to find that the GRE (the grad-equivalent of the SAT—it’s even by the same people!) has only sixth-through-ninth-grade maths on it; but in my review of some old concepts, I stumbled across factorials, which I last dealt with in programming recursive methods that would take a value and return its factorial only after a memory-and-proc-intensive computation. The factorial of any number is defined as that number times one less than it, times one less, and so forth, all the way down to 1: or, 1 times 2 times 3 and so on until we get to the number itself. Hence, Five factorial (written “5!”) equals 120, because 5*4*3*2*1==120.
But what about 0! ? Prima facie it makes sense that 0! would be 0, because 0*1==0, but it’s not. There is an explanation (which for the curious can be found here) as to why 0!==1, but I think we can all agree it doesn’t seem immediately intuitive.
This provides a funny, perhaps ridiculous, yet telling illustration of Creation. God created ex nihilo Being, i.e., all that exists, by speaking. If we may exercise a bit of comedic license, we can say that God shouted (!) at zero (nothingness) and 1 (Being) was the result; and at first it doesn’t make intuitive sense, but if we know the underlying algorithym (God’s character) everything just falls right into place.
I enjoyed your thoughts. God is indeed BIG and we often because of our finite and arrogant nature
reduce Him to being small like us. My biochemist father in law said if God made a big tree in an instant,
would the tree have growth rings? :O) As a practical physicist it helps me to remember that you and I
are “stuck” in time and space. God isn’t
I do not think that God had anything to do with zero factorial being
equal to one. I managed to write a 7-line, QBASIC program that
automatically computes 0! to 1. I wrote this program back in 1999,
and, while it doesn’t have multiple-precision (double-precision instead),
it can compute 100 factorial, or even larger factorials, instantly,
using scientific notation. Here it is: don’t ask how it works, because
I forgot how, but also please excuse the line numbers.
10 CLS: PRINT “FACTORIAL CALCULATOR”: PRINT
20 INPUT “ENTER NUMBER: “; N#
30 U# = 2
40 FOR T# = U# TO N#
50 U# = U# * T#
60 NEXT T#
70 PRINT “THE ANSWER IS: “; U# / 2
Is finding 100! possible?? Whats the algorithm for it ?????????
All that 100! does is multiply 100 numbers together in a decrementing loop, like 100*99*98*97…*1. I actually wrote another program that computes up to 1,000 factorial. 1,000 factorial is 2,568 digits long. I made two versions of the program: 16-bits, and 32-bits. Guess which ran faster? The 16-bit version. I never learned how to program in 32-bits, and now I strictly use a 64-bit computer. I don’t think I’ll be programming in 64-bits any time soon.
Alan
Alan
All that 100! does is multiply 100 numbers together in a decrementing loop, like 100*99*98*97…*1. I actually wrote another program that computes up to 1,000 factorial. 1,000 factorial is 2,568 digits long. I made two versions of the program: 16-bits, and 32-bits. All I did was use two different versions of the same compiler, which ran 16 and 32-bit programs in MS-DOS. Guess which ran faster? The 16-bit version. I never learned how to program in 32-bits, and now I strictly use a 64-bit computer. I don’t think I’ll be programming in 64-bits any time soon.
Alan
Alan
[powered by WordPress.]
For the discussion of current and historical trends in the liberal arts, information technology, and religious thought. "Of all human pursuits, the pursuit of wisdom is the more perfect, the more sublime, the more useful, and the more agreeable."
Think.
ThinkBlog.org has been on the web since August 2003, with 292,449 words in 846 posts.
It is presently 07:59:05 on 17 May 2008, server side. All content except where otherwise noted Copyright © 2000-2006 Michael Phillips.
43 queries. 1.256 seconds
January 15th, 2008 at 17:04:55
I enjoyed your thoughts. God is indeed BIG and we often because of our finite and arrogant nature
reduce Him to being small like us. My biochemist father in law said if God made a big tree in an instant,
would the tree have growth rings? :O) As a practical physicist it helps me to remember that you and I
are “stuck” in time and space. God isn’t
March 2nd, 2008 at 15:45:37
I do not think that God had anything to do with zero factorial being
equal to one. I managed to write a 7-line, QBASIC program that
automatically computes 0! to 1. I wrote this program back in 1999,
and, while it doesn’t have multiple-precision (double-precision instead),
it can compute 100 factorial, or even larger factorials, instantly,
using scientific notation. Here it is: don’t ask how it works, because
I forgot how, but also please excuse the line numbers.
10 CLS: PRINT “FACTORIAL CALCULATOR”: PRINT
20 INPUT “ENTER NUMBER: “; N#
30 U# = 2
40 FOR T# = U# TO N#
50 U# = U# * T#
60 NEXT T#
70 PRINT “THE ANSWER IS: “; U# / 2
April 14th, 2008 at 01:19:09
Is finding 100! possible?? Whats the algorithm for it ?????????
May 11th, 2008 at 18:36:45
All that 100! does is multiply 100 numbers together in a decrementing loop, like 100*99*98*97…*1. I actually wrote another program that computes up to 1,000 factorial. 1,000 factorial is 2,568 digits long. I made two versions of the program: 16-bits, and 32-bits. Guess which ran faster? The 16-bit version. I never learned how to program in 32-bits, and now I strictly use a 64-bit computer. I don’t think I’ll be programming in 64-bits any time soon.
Alan
Alan
May 11th, 2008 at 18:38:31
All that 100! does is multiply 100 numbers together in a decrementing loop, like 100*99*98*97…*1. I actually wrote another program that computes up to 1,000 factorial. 1,000 factorial is 2,568 digits long. I made two versions of the program: 16-bits, and 32-bits. All I did was use two different versions of the same compiler, which ran 16 and 32-bit programs in MS-DOS. Guess which ran faster? The 16-bit version. I never learned how to program in 32-bits, and now I strictly use a 64-bit computer. I don’t think I’ll be programming in 64-bits any time soon.
Alan
Alan