- #1
elusiveshame
- 169
- 35
Hey everyone,
I wasn't sure if this belonged in the general math forum or not, so I posted it here instead (mods - feel free to move if it belongs elsewhere).
What I want to know is how to properly write out a computer algorithm in proper math notation. Take this code for example:
To put it into a mathematical formula, how would you do it? The highest level of math completed was Single Variable Calculus, so going by what I know, it would look like:
index = x∑y∑ x + (y * x)
Is that even close?
I wasn't sure if this belonged in the general math forum or not, so I posted it here instead (mods - feel free to move if it belongs elsewhere).
What I want to know is how to properly write out a computer algorithm in proper math notation. Take this code for example:
Code:
Height = 4
Width = 10
For X = 0 to Width - 1
For Y = 0 to Height - 1
index = x + (y * width)
Next
Next
To put it into a mathematical formula, how would you do it? The highest level of math completed was Single Variable Calculus, so going by what I know, it would look like:
index = x∑y∑ x + (y * x)
Is that even close?