The History of "i" [modified]
-
You know the ubiqious "i" found in almost every example of a for loop for newbies? On another forum were having this disscussion (sorta)... I said (I believe I read it in an C K&R book) that it's because it's simply an alias for Index which is what "i" is usually doing in a for loop...?? Someone else says it has to do with: They are from general Summation Notation that, like many other mathmatical notations, worked its way into early languages -- specifically Fortran (remember its FORMula TRANSlation) I never would have guessed :P Cheers :) It's frustrating being a genius and living the life of a moron!!! -- modified at 21:18 Wednesday 4th October, 2006
In mathematics, i, j, and k are universal - they are used as integers, indices and to designate imaginary axes for vector quantities. This bled over into FORTRAN when computers were run almost exclusively for mathematicians and has stuck for decades. The use of n is a fairly new development, but it was only a matter of time before we ran out of integers. Fortunately, x and y are still usable for real numbers, and one has to grant them credit - there are an awful lot of real numbers. These valiant variables don't get half the credit they deserve... Engineers have done what we can to preserve the available pool of numeric variables. We use x, y, and z to designate unit vector directions, thereby reducing the load that i, j, and k have to carry. Recognizing the need to conserve, we have also adopted the variable s to designate the special value jw, mainly because it makes the math a lot easier. "...a photo album is like Life, but flat and stuck to pages." - Shog9
-
In mathematics, i, j, and k are universal - they are used as integers, indices and to designate imaginary axes for vector quantities. This bled over into FORTRAN when computers were run almost exclusively for mathematicians and has stuck for decades. The use of n is a fairly new development, but it was only a matter of time before we ran out of integers. Fortunately, x and y are still usable for real numbers, and one has to grant them credit - there are an awful lot of real numbers. These valiant variables don't get half the credit they deserve... Engineers have done what we can to preserve the available pool of numeric variables. We use x, y, and z to designate unit vector directions, thereby reducing the load that i, j, and k have to carry. Recognizing the need to conserve, we have also adopted the variable s to designate the special value jw, mainly because it makes the math a lot easier. "...a photo album is like Life, but flat and stuck to pages." - Shog9
Roger Wright wrote:
The use of n is a fairly new development
I think n might be a hungarian notation artifact, meaning "number". I have found it it in a lot of my old code. :-O
- S 50 cups of coffee and you know it's on!
-
What do you mean by "the times there was no i"? :~ Cheers, Vikram.
I don't know and you don't either. Militant Agnostic
Vikram A Punathambekar wrote:
What do you mean by "the times there was no i"?
'i' is a very recent letter. Discovered in 1984 by a French astrologer I believe :rolleyes:
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
You know the ubiqious "i" found in almost every example of a for loop for newbies? On another forum were having this disscussion (sorta)... I said (I believe I read it in an C K&R book) that it's because it's simply an alias for Index which is what "i" is usually doing in a for loop...?? Someone else says it has to do with: They are from general Summation Notation that, like many other mathmatical notations, worked its way into early languages -- specifically Fortran (remember its FORMula TRANSlation) I never would have guessed :P Cheers :) It's frustrating being a genius and living the life of a moron!!! -- modified at 21:18 Wednesday 4th October, 2006
-
Vikram A Punathambekar wrote:
What do you mean by "the times there was no i"?
'i' is a very recent letter. Discovered in 1984 by a French astrologer I believe :rolleyes:
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
I thought i/j/k were commonly used in mathematical circles, and so they just moved in to code. Christian Graus - Microsoft MVP - C++
i is reserved for sqrt(-1) cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Rage wrote:
"i" like "i"nteger, or "s" like "s"tring
Much like hungarian notation, which I happen to like (I'm not hungarian), but am slowly being converted to camelCase (I'm not a camel either).
- S 50 cups of coffee and you know it's on!
-
i is reserved for sqrt(-1) cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
i is reserved for sqrt(-1)
We're not going to start this discussion again...are we? :~
They dress you up in white satin, And give you your very own pair of wings In August and Everything After
I'm after everything
-
I normally throw spaghetti up against the wall. Then, when I see an interesting pattern, I write it down. And that's how I discover new letters. Coming up with the pronunciation for those letters is a little difficult though. :rolleyes:
They dress you up in white satin, And give you your very own pair of wings In August and Everything After
I'm after everything
-
I normally throw spaghetti up against the wall. Then, when I see an interesting pattern, I write it down. And that's how I discover new letters. Coming up with the pronunciation for those letters is a little difficult though. :rolleyes:
They dress you up in white satin, And give you your very own pair of wings In August and Everything After
I'm after everything
David Stone wrote:
Coming up with the pronunciation for those letters is a little difficult though.
Give the spaghetti to someone who eats with their mouth open and listen to the interesting sounds that emerge :)
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Rage wrote:
"i" like "i"nteger, or "s" like "s"tring
Much like hungarian notation, which I happen to like (I'm not hungarian), but am slowly being converted to camelCase (I'm not a camel either).
- S 50 cups of coffee and you know it's on!
Steve Echols wrote:
I'm not a camel either
:laugh: Are you sure?
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Chris Maunder wrote:
i is reserved for sqrt(-1)
We're not going to start this discussion again...are we? :~
They dress you up in white satin, And give you your very own pair of wings In August and Everything After
I'm after everything
David Stone wrote:
We're not going to start this discussion again...are we?
What discussion? :-O
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Steve Echols wrote:
I'm not a camel either
:laugh: Are you sure?
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
:laugh: No humps! Just double checked. Although...hunching over my monitor might give me a "single" in a couple more years. :)
- S 50 cups of coffee and you know it's on!
-
Chris Maunder wrote:
i is reserved for sqrt(-1)
We're not going to start this discussion again...are we? :~
They dress you up in white satin, And give you your very own pair of wings In August and Everything After
I'm after everything
Quit being irrational!:laugh:
The enemy's gate is down. :cool: Welcome to CP in your language. Post the unicode version in My CP Blog[^] now.
-
This brings back memories from the times there was no i.
FOR n=0 TO 5 ... NEXT n
:) regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.So you also programmed on ZX Spectrum :)
-
Quit being irrational!:laugh:
The enemy's gate is down. :cool: Welcome to CP in your language. Post the unicode version in My CP Blog[^] now.
-
The possibilities are transcendental when you get David and Ryan going on Mathematics. Add in Chris and well... somehow it all equals "i" in the end...:laugh:
The enemy's gate is down. :cool: Welcome to CP in your language. Post the unicode version in My CP Blog[^] now.
-
i is reserved for sqrt(-1) cheers, Chris Maunder
CodeProject.com : C++ MVP
I think I reserved i for 2 people at 7:00. :doh:
The enemy's gate is down. :cool: Welcome to CP in your language. Post the unicode version in My CP Blog[^] now.
-
You know the ubiqious "i" found in almost every example of a for loop for newbies? On another forum were having this disscussion (sorta)... I said (I believe I read it in an C K&R book) that it's because it's simply an alias for Index which is what "i" is usually doing in a for loop...?? Someone else says it has to do with: They are from general Summation Notation that, like many other mathmatical notations, worked its way into early languages -- specifically Fortran (remember its FORMula TRANSlation) I never would have guessed :P Cheers :) It's frustrating being a genius and living the life of a moron!!! -- modified at 21:18 Wednesday 4th October, 2006
ok , but why no f in cake ?
-
i is reserved for sqrt(-1) cheers, Chris Maunder
CodeProject.com : C++ MVP
Chris Maunder wrote:
i is reserved for sqrt(-1)
It depends. In electrical engineering, i is reserved for alternate current and, hence, we use j to refer to sqrt(-1). Francisco Silver at last!!