The History of "i" [modified]
-
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!!
-
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
It started here: n Σ i=0 the mathematical equivalent to:
for (i = 0; i <= n; i++) {
}Note the terminating condition, as the mathematical expression Σ includes the terminating value.
Software Zen:
delete this;
-
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!!
You do realise that as a mathematician it's my duty to insert lots of engineer jokes, right? ;) I'll let you off with a warning this time. cheers, Chris Maunder
CodeProject.com : C++ MVP
-
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
Hockey wrote:
But is it true? Am I rememering wrong?
"i" because it's automatically treated as an integer in Fortran--the first of several automatic integer variables, followed by "j", "k", "l", etc. I can't remember how many letters are allocated to be integers. Marc Pensieve Functional Entanglement vs. Code Entanglement Static Classes Make For Rigid Architectures Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-
You do realise that as a mathematician it's my duty to insert lots of engineer jokes, right? ;) I'll let you off with a warning this time. cheers, Chris Maunder
CodeProject.com : C++ MVP
Don't worry, I know quite a number of mathematics jokes. I suggest we call it even and stop this thread right here to avoid possible casualties should we start the war. :-D Francisco
-
Don't worry, I know quite a number of mathematics jokes. I suggest we call it even and stop this thread right here to avoid possible casualties should we start the war. :-D Francisco
:-D cheers, Chris Maunder
CodeProject.com : C++ MVP
-
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
Its because "i" stands for "Iteration/Iterator" :-O
-
i is reserved for sqrt(-1) cheers, Chris Maunder
CodeProject.com : C++ MVP
-
Ravi Bhavnani wrote:
Please. Let's try and be rational about this.
:laugh: Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
The Ultimate Grid - The #1 MFC grid out there! -
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
'i' for integer, 'i' for iterator. The tigress is here :-D
-
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"
-
: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!
-
So you also programmed on ZX Spectrum :)
-
Jeremy Falcon wrote:
I have always used x for that. It's the new-old-cool thing.
:shudder: except that x/X has spatial relationships automatically associated with its use. X and Y on a graph, X,Y,Z in 3D space. When I see x, I see spatial expectations. Personally I think that the use of 'i' comes from deeper inside. Is it the choice of 'i' because of the word integer or is the choice of 'i' as the first integer in Fortran because of a more narcissistic mathematical perspective. :rolleyes: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Jeffry J. Brickley wrote:
:shudder: except that x/X has spatial relationships automatically associated with its use. X and Y on a graph, X,Y,Z in 3D space. When I see x, I see spatial expectations.
Well, the majority of my programming days haven't been 3D programming. Although, I'm in the process of changing that.
Jeffry J. Brickley wrote:
Personally I think that the use of 'i' comes from deeper inside. Is it the choice of 'i' because of the word integer or is the choice of 'i' as the first integer in Fortran because of a more narcissistic mathematical perspective.
I agree. I'm just saying
x
is what the rebels use. Ok maybe not, but I have to justify it somehow. :) Jeremy Falcon -
Jeremy Falcon wrote:
I have always used x for that. It's the new-old-cool thing.
:shudder: except that x/X has spatial relationships automatically associated with its use. X and Y on a graph, X,Y,Z in 3D space. When I see x, I see spatial expectations. Personally I think that the use of 'i' comes from deeper inside. Is it the choice of 'i' because of the word integer or is the choice of 'i' as the first integer in Fortran because of a more narcissistic mathematical perspective. :rolleyes: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Btw, the reason I started using
x
was because it was a common variable name in math. No, not hard core math, but the stuff they teach you in grade school. I started programming way back then and it just stuck with me I guess. Jeremy Falcon -
Hockey wrote:
You know the ubiqious "i" found in almost every example of a for loop for newbies?
I have always used
x
for that. It's the new-old-cool thing. :) Jeremy FalconHi, the i history is simple. In mathematics, when dealing with matrices and vectors, you usually call a_i_j as the element at the i-th row and j-th column. Then, when iterating over a vector, you usually use this notation taken from linear algebra. Nowadays, this behaviour has been extended to almost every for loop. A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.